use of com.xenoage.zong.core.position.MP in project Zong by Xenoage.
the class ScoreTest method testMeasureElements.
private static <T> void testMeasureElements(List<Tuple2<MP, T>> expectedElements, Score score, BiFunction<Measure, Fraction, T> getElementAtBeat) {
for (Tuple2<MP, T> expectedElement : expectedElements) {
MP mp = expectedElement.get1();
Measure measure = score.getMeasure(mp);
T element = getElementAtBeat.apply(measure, mp.beat);
assertNotNull("" + mp, element);
assertEquals("" + mp, expectedElement.get2(), element);
}
}
use of com.xenoage.zong.core.position.MP in project Zong by Xenoage.
the class ScoreTest method testColumnElements.
private static <T> void testColumnElements(List<Tuple2<MP, T>> expectedElements, Score score, BiFunction<ColumnHeader, Fraction, T> getElementAtBeat) {
for (Tuple2<MP, T> expectedElement : expectedElements) {
MP mp = expectedElement.get1();
ColumnHeader columnHeader = score.getColumnHeader(mp.measure);
T element = getElementAtBeat.apply(columnHeader, mp.beat);
assertNotNull("" + mp, element);
assertEquals("" + mp, expectedElement.get2(), element);
}
}
use of com.xenoage.zong.core.position.MP in project Zong by Xenoage.
the class Test61c method test.
@Test
public void test() {
for (int iStaff : range(2)) {
for (int iElement : range(4)) {
MP mp = MP.atElement(iStaff, 0, 0, iElement);
Chord chord = ChordTest.getChordAt(score, mp);
assertEqualsChordLyrics(expectedLyrics[iStaff][iElement], chord, mp);
}
}
}
use of com.xenoage.zong.core.position.MP in project Zong by Xenoage.
the class Test61d method test.
@Test
public void test() {
for (int iMeasure : range(2)) {
for (int iElement : range(4)) {
MP mp = MP.atElement(0, iMeasure, 0, iElement);
Chord chord = ChordTest.getChordAt(score, mp);
assertEqualsChordLyrics(expectedLyrics[iMeasure * 4 + iElement], chord, mp);
}
}
}
use of com.xenoage.zong.core.position.MP in project Zong by Xenoage.
the class Test61i method test.
@Test
public void test() {
MP mp = MP.atElement(0, 0, 0, 0);
Chord chord = ChordTest.getChordAt(score, mp);
assertEquals(expectedChordNotesCount[0], chord.getNotes().size());
assertEqualsChordLyrics(expectedLyrics[0], chord, mp);
}
Aggregations