use of com.xenoage.zong.core.util.InconsistentScoreException in project Zong by Xenoage.
the class MusicXmlScoreFileInputTest method testSampleFiles.
/**
* It's too hard to check the contents of a MusicXML file
* automatically. We just try to load the score data and
* check if they could be loaded without problems.
*
* We check all official MusicXML 1.1 and 2.0 sample files.
*/
@Test
@SuppressWarnings("unused")
public void testSampleFiles() {
long startTime = System.currentTimeMillis();
for (String file : getSampleFiles()) {
try {
Score score = new MusicXmlScoreFileInput().read(jsePlatformUtils().openFile(file), file);
System.out.println("Loaded: " + file);
} catch (InconsistentScoreException ex) {
ex.printStackTrace();
fail("Score inconsistent after loading: " + file);
} catch (Exception ex) {
ex.printStackTrace();
fail("Failed to load file: " + file);
}
}
long totalTime = System.currentTimeMillis() - startTime;
// TEST
// System.out.println(getClass() + ": " + totalTime);
}
Aggregations