FC18: Clean unicode renderer methods to just one renderer method
This commit is contained in:
parent
99bce14fd1
commit
5cfb4893db
21 changed files with 103 additions and 115 deletions
|
|
@ -62,8 +62,9 @@ public class FourCornerUnicodeDisplayTest {
|
|||
cdc.add(FCDotDEC2701DashPX0.ESC_STOP);
|
||||
cdc.add(FCDotCDC1604DashP6.NX15_O);
|
||||
|
||||
Assertions.assertEquals("abBCD.jkππO", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
Assertions.assertEquals("βββ]Aβββ]Bβ½BCD.βββ]JK>LMβββO", FourCornerUnicodeDisplay.raw().renderFromX06(cdc));
|
||||
List<Integer> fc6 = FourCornerX06BaklavaPointSequence.toFC6(cdc);
|
||||
Assertions.assertEquals("abBCD.jkππO", FourCornerUnicodeDisplay.text().render(fc6));
|
||||
Assertions.assertEquals("βββ]Aβββ]Bβ½BCD.βββ]JK>LMβββO", FourCornerUnicodeDisplay.raw().render(fc6));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -77,7 +78,8 @@ public class FourCornerUnicodeDisplayTest {
|
|||
cdc.add(FCDotCDC1604DashP6.NY01_AT);
|
||||
cdc.add(FCDotCDC1604DashP6.NX11_K); // = K
|
||||
|
||||
Assertions.assertEquals("XK", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
List<Integer> fc6 = FourCornerX06BaklavaPointSequence.toFC6(cdc);
|
||||
Assertions.assertEquals("XK", FourCornerUnicodeDisplay.text().render(fc6));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -90,7 +92,8 @@ public class FourCornerUnicodeDisplayTest {
|
|||
cdc.add(FCDotCDC1604DashP6.NX04_D); // 3
|
||||
cdc.add(FCDotCDC1604DashP6.NX11_K); // K
|
||||
|
||||
Assertions.assertEquals("B3K", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
List<Integer> fc6 = FourCornerX06BaklavaPointSequence.toFC6(cdc);
|
||||
Assertions.assertEquals("B3K", FourCornerUnicodeDisplay.text().render(fc6));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -131,7 +134,8 @@ public class FourCornerUnicodeDisplayTest {
|
|||
cdc.add(FCDotCDC1604DashP6.NX09_I);
|
||||
cdc.add(FCDotCDC1604DashP6.NS04_RAKA1_INTERROBANG);
|
||||
|
||||
Assertions.assertEquals("ΞΈΜ²ΞΏΜ²ΞΉΜ²ΞΈΞΏΞΉhoihΜ²oΜ²iΜ²π©π°πͺπππΞΞΞπ―πΆπ°", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
List<Integer> fc6 = FourCornerX06BaklavaPointSequence.toFC6(cdc);
|
||||
Assertions.assertEquals("ΞΈΜ²ΞΏΜ²ΞΉΜ²ΞΈΞΏΞΉhoihΜ²oΜ²iΜ²π©π°πͺπππΞΞΞπ―πΆπ°", FourCornerUnicodeDisplay.text().render(fc6));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -142,7 +146,8 @@ public class FourCornerUnicodeDisplayTest {
|
|||
cdc.add(FCDotPIE9DDash10.BOLD_DECIMAL_3);
|
||||
cdc.add(FCDotCDC1604DashP6.NS04_RAKA1_INTERROBANG);
|
||||
|
||||
Assertions.assertEquals("πππ", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
List<Integer> fc6 = FourCornerX06BaklavaPointSequence.toFC6(cdc);
|
||||
Assertions.assertEquals("πππ", FourCornerUnicodeDisplay.text().render(fc6));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -163,7 +168,8 @@ public class FourCornerUnicodeDisplayTest {
|
|||
cdc.add(FCDotCDC1604DashP6.NX09_I);
|
||||
cdc.add(FCDotCDC1604DashP6.NS04_RAKA1_INTERROBANG);
|
||||
|
||||
// Assertions.assertEquals("π©π°πͺβββhoi", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
Assertions.assertEquals("βββhoi", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
List<Integer> fc6 = FourCornerX06BaklavaPointSequence.toFC6(cdc);
|
||||
// Assertions.assertEquals("π©π°πͺβββhoi", FourCornerUnicodeDisplay.text().renderFromInt18(fc6));
|
||||
Assertions.assertEquals("βββhoi", FourCornerUnicodeDisplay.text().render(fc6));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class FourCornerUnicodeImportTest {
|
|||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A.ordinal(), cdc.get(4));
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R.ordinal(), cdc.get(5));
|
||||
|
||||
String out = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String out = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertEquals("FOOBAR", out);
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ public class FourCornerUnicodeImportTest {
|
|||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A.ordinal(), cdi.next());
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R.ordinal(), cdi.next());
|
||||
|
||||
String out = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String out = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertEquals("foobar", out);
|
||||
}
|
||||
|
||||
|
|
@ -99,9 +99,9 @@ public class FourCornerUnicodeImportTest {
|
|||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A.ordinal(), cdi.next());
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R.ordinal(), cdi.next());
|
||||
|
||||
String out = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String out = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertEquals("fooBAR", out);
|
||||
Assertions.assertEquals("βββ]FOOβββBAR", FourCornerUnicodeDisplay.raw().renderFromInt18(cdc));
|
||||
Assertions.assertEquals("βββ]FOOβββBAR", FourCornerUnicodeDisplay.raw().render(cdc));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -117,7 +117,7 @@ public class FourCornerUnicodeImportTest {
|
|||
Assertions.assertEquals(FCDotCDC1604DashP6.NX01_A.cakePointDotIndex(), cdc.get(4));
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX18_R.cakePointDotIndex(), cdc.get(5));
|
||||
|
||||
String out = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String out = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertEquals("fooBAR", out);
|
||||
}
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ public class FourCornerUnicodeImportTest {
|
|||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToFC6(foobar);
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
Assertions.assertEquals("FOOBAR", FourCornerUnicodeDisplay.text().renderFromInt18(cdc));
|
||||
Assertions.assertEquals("FOOBAR", FourCornerUnicodeDisplay.text().render(cdc));
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
FourCornerUnicodeImport.strict().convertToFC6(foobar);
|
||||
});
|
||||
|
|
@ -140,7 +140,7 @@ public class FourCornerUnicodeImportTest {
|
|||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToFC6(foobar);
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
Assertions.assertEquals("FOOΒΏΒΏΒΏ", FourCornerUnicodeDisplay.text().renderFromInt18(cdc));
|
||||
Assertions.assertEquals("FOOΒΏΒΏΒΏ", FourCornerUnicodeDisplay.text().render(cdc));
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
FourCornerUnicodeImport.strict().convertToFC6(foobar);
|
||||
});
|
||||
|
|
@ -166,7 +166,7 @@ public class FourCornerUnicodeImportTest {
|
|||
Assertions.assertEquals(FCDotCDC1604DashP6.NX04_D.ordinal(), cdi.next()); // 3
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6.NX08_H.ordinal(), cdi.next()); // 7
|
||||
|
||||
String out = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String out = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertEquals("01201337", out);
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ public class FourCornerUnicodeImportTest {
|
|||
Assertions.assertEquals(FCDotPIE9CDash10.DECIMAL_3.cakePointDotIndex(), cdc.get(6)); // 3
|
||||
Assertions.assertEquals(FCDotPIE9CDash10.DECIMAL_7.cakePointDotIndex(), cdc.get(7)); // 7
|
||||
|
||||
String out = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String out = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertEquals("01201337", out);
|
||||
}
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ public class FourCornerUnicodeImportTest {
|
|||
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||
Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TTY0001_NL, cdi.next());
|
||||
*/
|
||||
String out = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String out = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertEquals("A\nB\nC\nD\nE\nF\n\n\n", out);
|
||||
}
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ public class FourCornerUnicodeImportTest {
|
|||
Assertions.assertNotNull(cdi.next()); // fixme
|
||||
//Assertions.assertEquals(FCDotCMD5401Dash2D.CMD_F4TXT0001_SP, cdi.next());
|
||||
}
|
||||
String out = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String out = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertEquals(" ββββββββββββββββββββββββ βββββββββββ Β ", out);
|
||||
|
||||
// Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ public class FCDotPIE9Test {
|
|||
cakePoints.add(i);
|
||||
}
|
||||
FourCornerUnicodeDisplay disp = FourCornerUnicodeDisplay.text();
|
||||
pieChars = disp.renderFromInt18(cakePoints);
|
||||
pieChars = disp.render(cakePoints);
|
||||
int cakeStart = FourCornerDotCake.FC_CDC1604_P6.getStart();
|
||||
int cakeStop = FourCornerDotCake.FC_BYD0127_P7F.getStop();
|
||||
for (int i = cakeStart; i <= cakeStop; i++) {
|
||||
cakePoints.add(i);
|
||||
}
|
||||
cakeChars = disp.renderFromInt18(cakePoints);
|
||||
cakeChars = disp.render(cakePoints);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ public class FCDotBYDTest {
|
|||
cdc.add(FCDotBYD0127DashP7F.BOX1_03);
|
||||
cdc.add(FCDotBYD0127DashP7F.BOX1_07);
|
||||
|
||||
Assertions.assertEquals("ββββββββ", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
List<Integer> fc6 = FourCornerX06BaklavaPointSequence.toFC6(cdc);
|
||||
Assertions.assertEquals("ββββββββ", FourCornerUnicodeDisplay.text().render(fc6));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,14 +58,14 @@ public class FCDotCDC1604DashP6Test {
|
|||
|
||||
@Test
|
||||
public void testPepper3Sequence() throws Exception {
|
||||
Assertions.assertEquals("???", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 0)));
|
||||
Assertions.assertEquals("??!", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 1)));
|
||||
Assertions.assertEquals("?!?", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 2)));
|
||||
Assertions.assertEquals("?!!", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 3)));
|
||||
Assertions.assertEquals("!??", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 4)));
|
||||
Assertions.assertEquals("!?!", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 5)));
|
||||
Assertions.assertEquals("!!?", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 6)));
|
||||
Assertions.assertEquals("!!!", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 7)));
|
||||
Assertions.assertEquals("???", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 0)));
|
||||
Assertions.assertEquals("??!", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 1)));
|
||||
Assertions.assertEquals("?!?", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 2)));
|
||||
Assertions.assertEquals("?!!", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 3)));
|
||||
Assertions.assertEquals("!??", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 4)));
|
||||
Assertions.assertEquals("!?!", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 5)));
|
||||
Assertions.assertEquals("!!?", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 6)));
|
||||
Assertions.assertEquals("!!!", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.pepper3SequenceWrite(new ArrayList<>(), 7)));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -80,14 +80,14 @@ public class FCDotCDC1604DashP6Test {
|
|||
|
||||
@Test
|
||||
public void testSalt3Sequence() throws Exception {
|
||||
Assertions.assertEquals("<<<", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 0)));
|
||||
Assertions.assertEquals("<<>", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 1)));
|
||||
Assertions.assertEquals("<><", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 2)));
|
||||
Assertions.assertEquals("<>>", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 3)));
|
||||
Assertions.assertEquals("><<", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 4)));
|
||||
Assertions.assertEquals("><>", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 5)));
|
||||
Assertions.assertEquals(">><", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 6)));
|
||||
Assertions.assertEquals(">>>", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 7)));
|
||||
Assertions.assertEquals("<<<", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 0)));
|
||||
Assertions.assertEquals("<<>", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 1)));
|
||||
Assertions.assertEquals("<><", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 2)));
|
||||
Assertions.assertEquals("<>>", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 3)));
|
||||
Assertions.assertEquals("><<", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 4)));
|
||||
Assertions.assertEquals("><>", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 5)));
|
||||
Assertions.assertEquals(">><", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 6)));
|
||||
Assertions.assertEquals(">>>", FourCornerUnicodeDisplay.text().render(FCDotCDC1604DashP6.salt3SequenceWrite(new ArrayList<>(), 7)));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class FCDotVT06Test {
|
|||
cdc.addAll(FourCornerRecipe.toDecimalsX06(456));
|
||||
cdc.add(FCDotCDC1604DashP6.NS04_RAKA1_INTERROBANG.baklavaPointDotIndex());
|
||||
|
||||
Assertions.assertEquals("βββAGβββ^BCDΒΏβββ^EFGβ½", FourCornerUnicodeDisplay.raw().renderFromInt18(cdc));
|
||||
Assertions.assertEquals("βββAGβββ^BCDΒΏβββ^EFGβ½", FourCornerUnicodeDisplay.raw().render(cdc));
|
||||
// TODO: Fix lexer embedded escapes, and display external with single unicode escape sign
|
||||
//Assertions.assertEquals("?AG?BCD?EFG!", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
}
|
||||
|
|
@ -61,6 +61,6 @@ public class FCDotVT06Test {
|
|||
cdc.addAll(FourCornerRecipe.toDecimalsX06(5));
|
||||
cdc.add(FCDotCDC1604DashP6.NS04_RAKA1_INTERROBANG.baklavaPointDotIndex());
|
||||
|
||||
Assertions.assertEquals("βββCAβββ^Fβ½", FourCornerUnicodeDisplay.raw().renderFromInt18(cdc));
|
||||
Assertions.assertEquals("βββCAβββ^Fβ½", FourCornerUnicodeDisplay.raw().render(cdc));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,6 @@ public class FourCornerZionStenoLexerSmokeTest {
|
|||
smokeReader.reset();
|
||||
lexer.read(cdc);
|
||||
String res = "[0:1:burnNumberMissingSparkler:CHOCO_PIG_RATIONAL][0:8:burnNumberMissingSparkler:CHOCO_PIG_RATIONAL][0:16:burnNumberMissingSparkler:CHOCO_PIG_RATIONAL]";
|
||||
Assertions.assertEquals(res, FourCornerUnicodeDisplay.text().renderFromInt18(cdc));
|
||||
Assertions.assertEquals(res, FourCornerUnicodeDisplay.text().render(cdc));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class StenoGrapherTest {
|
|||
Assertions.assertEquals(37, outTest.next());
|
||||
Assertions.assertEquals(4, outTest.next());
|
||||
Assertions.assertEquals(37, outTest.next());
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("0A", res);
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ public class StenoGrapherTest {
|
|||
octalMine.add(PrimordialOctalSound.PART_1);
|
||||
}
|
||||
writer.strobeSandWorm(octalMine, List.of(PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertTrue(res.endsWith("77"), "missing " + res);
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ public class StenoGrapherTest {
|
|||
PrimordialOctalOrangeString str = PrimordialOctalOrangeString.ioSmurfReadStreamX8(in);
|
||||
List<Integer> testX18 = new ArrayList<>();
|
||||
PrimordialOctalOrangeString.ioSmurfWriteListX18(testX18, str);
|
||||
String fileStr = FourCornerUnicodeDisplay.text().renderFromInt18(testX18);
|
||||
String fileStr = FourCornerUnicodeDisplay.text().render(testX18);
|
||||
//System.out.println(fileStr);
|
||||
Assertions.assertFalse(fileStr.contains("burnNCR1632MissingBankSparkler"), "data error");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ public class StenoLexerInvalidTest {
|
|||
@Test
|
||||
public void testInvalid18Plus() throws Exception {
|
||||
String res = "[0:0:burnLexerReservedCakePoint:0x40000]";
|
||||
Assertions.assertEquals(res, FourCornerUnicodeDisplay.text().renderFromInt18(List.of(0x040000)));
|
||||
Assertions.assertEquals(res, FourCornerUnicodeDisplay.text().render(List.of(0x040000)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalid18PlusError() throws Exception {
|
||||
Assertions.assertThrows(IllegalStateException.class, () -> {
|
||||
new FourCornerUnicodeDisplay(true, true, null).renderFromInt18(List.of(0x040000));
|
||||
new FourCornerUnicodeDisplay(true, true, null).render(List.of(0x040000));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ public class StenoLexerInvalidTest {
|
|||
cdc.add(0x0400FD);
|
||||
cdc.add(FCDotCDC1604DashP6.NX23_W.ordinal());
|
||||
cdc.add(0x0400FC);
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String res = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertTrue(res.contains("400ff"), "No 400ff in: " + res);
|
||||
Assertions.assertTrue(res.contains("400fe"), "No 400fe in: " + res);
|
||||
Assertions.assertTrue(res.contains("400fd"), "No 400fd in: " + res);
|
||||
|
|
@ -76,7 +76,7 @@ public class StenoLexerInvalidTest {
|
|||
cdc.add(0xFE);
|
||||
cdc.add(FCDotCDC1604DashP6.NY01_AT.ordinal());
|
||||
cdc.add(0xFD);
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(cdc);
|
||||
String res = FourCornerUnicodeDisplay.text().render(cdc);
|
||||
Assertions.assertTrue(res.contains("0xff"), "No 0xff in: " + res);
|
||||
Assertions.assertTrue(res.contains("0xfe"), "No 0xfe in: " + res);
|
||||
Assertions.assertTrue(res.contains("0xfd"), "No 0xfd in: " + res);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class StenoNumberBase2Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Bereshit writer = FourCornerZionStenoGrapher.writerFC6(out);
|
||||
writer.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0032, BigInteger.valueOf(123456789));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("123456789", res);
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ public class StenoNumberBase2Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0032, BigInteger.valueOf(123));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("123", res);
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ public class StenoNumberBase2Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE2Signed(FCFlameFremanSignedBase2.SIGNED_0128, true, BigInteger.valueOf(123));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("-123", res);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class StenoNumberBase8Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE8Lego(FCFlameFremanLegoBase8.LEGO_0144, BigInteger.valueOf(123));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("123", res);
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ public class StenoNumberBase8Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE8Lego(FCFlameFremanLegoBase8.LEGO_0144, BigInteger.valueOf(123456));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("123456", res);
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ public class StenoNumberBase8Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE8Choco(FCFlameFremanChocoBase8.CHOCO_0144, FCFlameNumberTaste.NUMBER_POSITIVE, new BigInteger("123", 10));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("123", res);
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ public class StenoNumberBase8Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE8Choco(FCFlameFremanChocoBase8.CHOCO_0144, FCFlameNumberTaste.NUMBER_NEGATIVE, new BigInteger("123456", 10));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("-123456", res);
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ public class StenoNumberBase8Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE8Choco(FCFlameFremanChocoBase8.CHOCO_0144, FCFlameNumberTaste.NUMBER_POSITIVE, new BigInteger("1393796574908163946345982392040522594123775", 10));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("1393796574908163946345982392040522594123775", res);
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ public class StenoNumberBase8Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Bereshit writer = FourCornerZionStenoGrapher.writerFC6Plus(out);
|
||||
writer.strobeNumberBASE8Choco(FCFlameFremanChocoBase8.CHOCO_0144, FCFlameNumberTaste.NUMBER_POSITIVE, new BigInteger("1393796574908163946345982392040522594123775", 10));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("1393796574908163946345982392040522594123775", res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class StenoNumberChocoChopedTest {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberChocoPigChoped(FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.valueOf(456), BigInteger.valueOf(123));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("456.123", res);
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ public class StenoNumberChocoChopedTest {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberChocoPigChoped(FCFlameNumberTaste.NUMBER_NEGATIVE, BigInteger.valueOf(789), BigInteger.valueOf(123));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("-789.123", res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class StenoNumberChocoDecimalTest {
|
|||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberChocoPigDecimal(FCFlameNumberTaste.NUMBER_POSITIVE, false, BigInteger.valueOf(123), BigInteger.valueOf(456));
|
||||
Assertions.assertEquals(4, out.size());
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("(-1)β°*10ΒΉΒ²Β³*456", res);
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ public class StenoNumberChocoDecimalTest {
|
|||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberChocoPigDecimal(FCFlameNumberTaste.NUMBER_POSITIVE, false, FourCornerZionStenoPetroglyphs.BIG_BITS_283, FourCornerZionStenoPetroglyphs.BIG_BITS_2016);
|
||||
Assertions.assertEquals(193, out.size());
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("(-1)β°*10ΒΉβ΅β΅β΄ΒΉΒ³β΅ΒΉΒΉΒ³β·βΈβ°β΅βΈΒ³Β²β΅βΆβ·Β³β΅β΅βΆβΉβ΅Β²β΅β΄β΅βΈβΈΒΉβ΅ΒΉΒ²β΅Β³ΒΉΒ³βΉΒ²β΅β΄β·ΒΉΒ²β΄ΒΉβ·ΒΉΒΉβΆΒΉβ·β°β°ΒΉβ΄β΄βΉβΉΒ²β·β·βΉΒΉΒΉΒ²Β³β΄Β²βΈΒΉβΆβ΄ΒΉβΆβΆβ·βΉβΈβ΅β΄β°β·*7524389324549354450012295667238056650488661292408472865850279440061341770661038088891003609523855490537527473858068236032063038821912119420032983735773778315780422968627185582125139830259059580693966159220800634538007951025529707819651368618588002973837229854435730968342995245834129352264002058451047722604571453619205472623157541916371455764131661512732115122042085430429090324954236930736866452001076451671762299658372499364800367306988138217572983729940207496105489713305332746758395131148149101871456611571055068153665866066783899124296271513772531723497342815490725823828326183977758546404902789185535", res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class StenoNumberChocoFloatTest {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberChocoPigFloat(FCFlameNumberTaste.NUMBER_NEGATIVE, false, BigInteger.valueOf(456), BigInteger.valueOf(123));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("(-1)ΒΉ*2β΄β΅βΆ*1.123", res);
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ public class StenoNumberChocoFloatTest {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberChocoPigFloat(FCFlameNumberTaste.NUMBER_POSITIVE, true, BigInteger.valueOf(456), BigInteger.valueOf(789));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("(-1)β°*2β»β΄β΅βΆ*1.789", res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class StenoNumberChocoRationalTest {
|
|||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v2);
|
||||
BigInteger v3 = BigInteger.valueOf(5432);
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_NEGATIVE, FCFlameNumberTaste.NUMBER_NEGATIVE, v3, v3);
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("ΒΉ/βββΒΉ/βββββ
β»β΅β΄Β³Β²/ββ
βββ", res);
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ public class StenoNumberChocoRationalTest {
|
|||
BigInteger v = BigInteger.valueOf(x);
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v);
|
||||
}
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertTrue(res.startsWith("ΒΉ/βΒΉ/βΒΉ/β"), "missing " + res);
|
||||
Assertions.assertTrue(res.contains("ΒΉ/β
ββΒΉ/β
ββΒΉ/β
ββ"), "missing " + res);
|
||||
Assertions.assertTrue(res.endsWith("ΒΉ/ββββΒΉ/ββββΒΉ/ββββ
"), "missing " + res);
|
||||
|
|
@ -116,7 +116,7 @@ public class StenoNumberChocoRationalTest {
|
|||
cdc.add(FourCornerDotCake.FC_RATIONAL2304_BANK.getStart() + 1);
|
||||
cdc.add(FCDotCDC1604DashP6.NY14_SEMICOLON.ordinal());
|
||||
|
||||
Assertions.assertEquals("X=ΒΉ/ββΒΉ/βΒΉβ΄/ββ
ΒΉΒ²Β³/βββββ΄/β;", FourCornerUnicodeDisplay.text().renderFromInt18(cdc));
|
||||
Assertions.assertEquals("X=ΒΉ/ββΒΉ/βΒΉβ΄/ββ
ΒΉΒ²Β³/βββββ΄/β;", FourCornerUnicodeDisplay.text().render(cdc));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -128,6 +128,6 @@ public class StenoNumberChocoRationalTest {
|
|||
}
|
||||
String resSuper = "Β³βΈΒ²Β³Β²β·β°β΄βΆβΈΒ³β°Β²βΉβ΄ΒΉβΈβ΄Β²β°β°Β²β°Β²β΄βΆβ°β·β΄β΅β°Β³β΅β·βΉΒ²β΅β΅β·β°βΉβΈβΈΒ³β΅βΈβΉβΆβ΅β°β΄βΉβΉβ΄β°βΆΒ³β·Β²ΒΉΒ²Β³β΄βΈΒΉβΈΒ²β΄βΈΒΉΒΉΒΉΒ²Β²β΅β΅β·β΄β·Β³βΉβ΅ΒΉΒΉΒΉβΆβ·βΈβΉβΉβΆΒΉΒ³β΄βΈβ·Β³Β²Β³β·β°ΒΉβΉβ·β΄β°Β²βΈΒΉβΆβ·βΉβ΅βΉβ΄Β³ΒΉβ΅β΄β°βΉβ°Β²βΈβΆβΈβΈβ°Β²Β²ΒΉβΈβΉβ·β΅βΉβ΄ΒΉβ΅βΆβ΄β΅βΈβ΅ΒΉβ°β΅β΅βΆΒ³βΈΒΉβΆβ΄ΒΉβ°β΅Β³β·βΉβ°Β²βΉβ΅βΆβ°β·ΒΉβ·β΅Β³βΈβΈβ·βΈΒ³ΒΉβΉΒ³βΆΒΉβ΄β΄βΉβΈΒΉΒ³β΄βΉβ·ΒΉβ΄βΉβΉβ·β΅β·β΅Β³Β³β°β°β·β΅βΈβΈβΆβ΄Β²β΄β΅ΒΉΒ³β°β΅β°β·Β³βΆΒΉΒΉΒ²βΉβΆβ·β·ΒΉβ°βΆΒΉβΆΒΉβΈΒΉβ΅β΅β°βΈΒ²β΅βΉβ·βΆβΈβ·β΅ΒΉβ΄Β²β·βΈβ°βΆΒ²β΄β°ΒΉΒ²Β³ΒΉΒΉβ·ΒΉβ·Β²β·β΄ΒΉβΉβ·βΆβ΅β΅β°ΒΉβΆΒ²β·ΒΉβΉβ·Β²βΈΒ²β΄βΉβΈβΈΒ²β°βΆβ΅Β³β΅βΆβ·βΈβ΅βΆΒ²β°β΄β΅Β²Β³β΄ΒΉβ΄β°βΉΒΉΒ³βΉβ΅β·Β³β°β΅Β²ΒΉβ΅βΈβΉβ΅β΄β°β΄Β²Β³βΈΒ²β΄β°β°β΅βΈβΈβ΅βΆβ΅β΄β΄βΆβΆβ΅β΅";
|
||||
String resSuber = "ββββββββββββββββββββββββββββββ
βββ
ββββ
β
βββββββ
ββββ
ββββββββββββββββββββββββββ
β
ββββββ
βββββββββββββββββββββββββββββββ
βββββ
βββββββββββββββββ
ββββ
βββ
ββ
βββ
β
βββββββββ
βββββββ
ββββββ
ββββββββββββββββββββββββββ
ββ
ββββββ
βββββββ
ββββ
ββββββββββββββββββββ
β
ββββ
ββββββ
ββββββββββββββββββββββββββ
β
βββββββββββββββββββ
ββ
ββββ
βββββ
βββββββββββ
ββββ
βββ
βββ
βββββββββββ
βββ
ββ
βββββ
β
";
|
||||
Assertions.assertEquals(resSuper + "/" + resSuber, FourCornerUnicodeDisplay.text().renderFromInt18(cdc));
|
||||
Assertions.assertEquals(resSuper + "/" + resSuber, FourCornerUnicodeDisplay.text().render(cdc));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class StenoNumberGramTest {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberGrams(FCFlameNumberGram.CUT_10, List.of(0,1,2,3,4,5,6,7,8,9)); // TODO: realign PIE candy numbers to be ONE based to align with terminators
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
String res = FourCornerUnicodeDisplay.text().render(out);
|
||||
Assertions.assertEquals("0123456789", res);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loadingβ¦
Add table
Add a link
Reference in a new issue