use of com.xenoage.zong.core.Score in project Zong by Xenoage.
the class Test32b method testFontSize.
@Test
public void testFontSize() {
Score score = getScore();
// in the following pairs of words, the left words has smaller font size
// than the right words
int[][] indexPairs = { // medium, large
{ 1, 2 }, // small, medium
{ 4, 0 } };
for (int[] indexPair : indexPairs) {
float size1 = getFontSize(score, indexPair[0]);
float size2 = getFontSize(score, indexPair[1]);
assertTrue(size1 < size2);
}
}
use of com.xenoage.zong.core.Score in project Zong by Xenoage.
the class Test41a method test.
@Test
public void test() {
Score score = getScore();
StavesList stavesList = score.getStavesList();
List<Part> parts = stavesList.getParts();
assertEquals(expectedNames.length, parts.size());
for (int i : range(parts)) {
assertEquals(expectedNames[i], parts.get(i).getName());
int firstStaffIndex = stavesList.getPartStaffIndices(parts.get(i)).getStart();
assertEquals(expectedPitches[i], getFirstPitch(score, firstStaffIndex));
}
}
use of com.xenoage.zong.core.Score in project Zong by Xenoage.
the class Test41f method test.
@Test
public void test() {
Score score = getScore();
StavesList stavesList = score.getStavesList();
StavesListTest.checkBracketGroups(stavesList, expectedBracketGroups);
StavesListTest.checkBarlineGroups(stavesList, expectedBarlineGroups);
}
use of com.xenoage.zong.core.Score in project Zong by Xenoage.
the class Test12a method test.
@Test
public void test() {
Score score = getScore();
// check clefs and line position of c4
int m = 0;
checkClef(score, m++, ClefSymbol.G, 2, -2);
checkClef(score, m++, ClefSymbol.C, 4, 4);
checkClef(score, m++, ClefSymbol.C, 6, 6);
checkClef(score, m++, ClefSymbol.F, 6, 10);
// in Zong!, we use Perc = Treble
checkClef(score, m++, ClefSymbol.PercTwoRects, 4, -2);
checkClef(score, m++, ClefSymbol.G8vb, 2, 5);
checkClef(score, m++, ClefSymbol.F8vb, 6, 17);
checkClef(score, m++, ClefSymbol.F, 4, 8);
checkClef(score, m++, ClefSymbol.G, 0, -4);
checkClef(score, m++, ClefSymbol.C, 8, 8);
checkClef(score, m++, ClefSymbol.C, 2, 2);
checkClef(score, m++, ClefSymbol.C, 0, 0);
// in Zong!, we use Perc = Treble
checkClef(score, m++, ClefSymbol.PercTwoRects, 4, -2);
checkClef(score, m++, ClefSymbol.G8va, 2, -9);
checkClef(score, m++, ClefSymbol.F8va, 6, 3);
// in Zong!, we use Tab = Treble
checkClef(score, m++, ClefSymbol.Tab, 4, -2);
// in Zong!, we use None = Treble
checkClef(score, m++, ClefSymbol.None, 4, -2);
checkClef(score, m++, ClefSymbol.G, 2, -2);
}
Aggregations