FC18: Removed some local private test variable unneeded post fix
This commit is contained in:
parent
3efd7c8918
commit
e493389a06
7 changed files with 109 additions and 110 deletions
|
|
@ -64,9 +64,9 @@ public class StenoGrapherTest {
|
|||
@Test
|
||||
public void testStenoAutoFC6Plus() throws Exception {
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Bereshit writerFC06 = FourCornerZionStenoGrapher.writerFC6Plus(out);
|
||||
writerFC06.strobeTheWord(FCFlameWordDish.CANDY_PIE, 0x00012D);
|
||||
writerFC06.strobeTheWord(FCFlameWordDish.APPETIZER, FCDotCDC1604DashP6.NX01_A.baklavaPointDotIndex());
|
||||
FourCornerZion7Bereshit writer = FourCornerZionStenoGrapher.writerFC6Plus(out);
|
||||
writer.strobeTheWord(FCFlameWordDish.CANDY_PIE, 0x00012D);
|
||||
writer.strobeTheWord(FCFlameWordDish.APPETIZER, FCDotCDC1604DashP6.NX01_A.baklavaPointDotIndex());
|
||||
Assertions.assertEquals(7, out.size());
|
||||
Iterator<Integer> outTest = out.iterator();
|
||||
Assertions.assertEquals(2, outTest.next());
|
||||
|
|
@ -83,15 +83,15 @@ public class StenoGrapherTest {
|
|||
@Test
|
||||
public void testSandWorm() throws Exception {
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
FourCornerZion7BaseVoid writer = FourCornerZionStenoGrapher.writerFC18Worms(out);
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
writerX18.strobeSandWorm(List.of(PrimordialOctalSound.PART_1), List.of(PrimordialOctalSound.PART_1));
|
||||
writer.strobeSandWorm(List.of(PrimordialOctalSound.PART_1), List.of(PrimordialOctalSound.PART_1));
|
||||
});
|
||||
List<PrimordialOctal> octalMine = new ArrayList<>();
|
||||
for (int i=0;i<24;i++) {
|
||||
octalMine.add(PrimordialOctalSound.PART_1);
|
||||
}
|
||||
writerX18.strobeSandWorm(octalMine, List.of(PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8, PrimordialOctalSound.PART_8));
|
||||
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);
|
||||
Assertions.assertTrue(res.endsWith("77"), "missing " + res);
|
||||
}
|
||||
|
|
@ -102,14 +102,14 @@ public class StenoGrapherTest {
|
|||
try (OutputStream out = new FileOutputStream(testFile)) {
|
||||
//FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerX18PackedX8(out);
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeDocumentAlpha();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writer.strobeDocumentAlpha();
|
||||
for (int x = 1; x <= 1025 /*_999999*/; x++) {
|
||||
BigInteger v = BigInteger.valueOf(x);
|
||||
writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v);
|
||||
writerX18.strobeTheWord(FCFlameWordDish.CLOCK_SAUCE, FCDotF4TTY0001DashNL.NETHER_LINE.cakePointDotIndex());
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v);
|
||||
writer.strobeTheWord(FCFlameWordDish.CLOCK_SAUCE, FCDotF4TTY0001DashNL.NETHER_LINE.cakePointDotIndex());
|
||||
}
|
||||
writerX18.strobeDocumentOmega();
|
||||
writer.strobeDocumentOmega();
|
||||
PrimordialOctalOrangeString str = PrimordialOctalOrangeString.ioSmurfReadListX18(outX18);
|
||||
PrimordialOctalOrangeString.ioSmurfWriteStreamX8(out, str);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import java.util.List;
|
|||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.x4o.fc18.FourCornerUnicodeDisplay;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||
import org.x4o.fc18.zion7.flame4.FCFlameFremanLegoBase2;
|
||||
import org.x4o.fc18.zion7.flame4.FCFlameFremanSignedBase2;
|
||||
|
||||
|
|
@ -46,45 +45,45 @@ public class StenoNumberBase2Test {
|
|||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Bereshit writer = FourCornerZionStenoGrapher.writerFC6(out);
|
||||
writer.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0032, BigInteger.valueOf(123456789));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertEquals("123456789", resX18);
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertEquals("123456789", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBASE2Lego123() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0032, BigInteger.valueOf(123));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("123", resX18);
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0032, BigInteger.valueOf(123));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertEquals("123", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBASE2Signed123() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE2Signed(FCFlameFremanSignedBase2.SIGNED_0128, true, BigInteger.valueOf(123));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("-123", resX18);
|
||||
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);
|
||||
Assertions.assertEquals("-123", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBASE2LegoMax() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0016, BigInteger.valueOf(0xFFFF));
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0016, BigInteger.valueOf(0xFFFF));
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
writerX18.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0016, BigInteger.valueOf(0xFFFF + 1));
|
||||
writer.strobeNumberBASE2Lego(FCFlameFremanLegoBase2.LEGO_0016, BigInteger.valueOf(0xFFFF + 1));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBASE2SignedMax() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE2Signed(FCFlameFremanSignedBase2.SIGNED_0016, false, BigInteger.valueOf(0x7FFF));
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE2Signed(FCFlameFremanSignedBase2.SIGNED_0016, false, BigInteger.valueOf(0x7FFF));
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
writerX18.strobeNumberBASE2Signed(FCFlameFremanSignedBase2.SIGNED_0016, false, BigInteger.valueOf(0x7FFF + 1));
|
||||
writer.strobeNumberBASE2Signed(FCFlameFremanSignedBase2.SIGNED_0016, false, BigInteger.valueOf(0x7FFF + 1));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,47 +43,47 @@ public class StenoNumberBase8Test {
|
|||
|
||||
@Test
|
||||
public void testBASE8Lego123() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE8Lego(FCFlameFremanLegoBase8.LEGO_0144, BigInteger.valueOf(123));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("123", resX18);
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE8Lego(FCFlameFremanLegoBase8.LEGO_0144, BigInteger.valueOf(123));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertEquals("123", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBASE8Lego123456() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE8Lego(FCFlameFremanLegoBase8.LEGO_0144, BigInteger.valueOf(123456));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("123456", resX18);
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
writer.strobeNumberBASE8Lego(FCFlameFremanLegoBase8.LEGO_0144, BigInteger.valueOf(123456));
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertEquals("123456", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBASE8Choco123() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE8Choco(FCFlameFremanChocoBase8.CHOCO_0144, FCFlameNumberTaste.NUMBER_POSITIVE, new BigInteger("123", 10));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("123", resX18);
|
||||
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);
|
||||
Assertions.assertEquals("123", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBASE8Choco123456Neg() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE8Choco(FCFlameFremanChocoBase8.CHOCO_0144, FCFlameNumberTaste.NUMBER_NEGATIVE, new BigInteger("123456", 10));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("-123456", resX18);
|
||||
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);
|
||||
Assertions.assertEquals("-123456", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBASE8ChocoLarge() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberBASE8Choco(FCFlameFremanChocoBase8.CHOCO_0144, FCFlameNumberTaste.NUMBER_POSITIVE, new BigInteger("1393796574908163946345982392040522594123775", 10));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("1393796574908163946345982392040522594123775", resX18);
|
||||
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);
|
||||
Assertions.assertEquals("1393796574908163946345982392040522594123775", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -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 resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertEquals("1393796574908163946345982392040522594123775", resX18);
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertEquals("1393796574908163946345982392040522594123775", res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,19 +41,19 @@ public class StenoNumberChocoChopedTest {
|
|||
|
||||
@Test
|
||||
public void testChochChoped123() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberChocoPigChoped(FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.valueOf(456), BigInteger.valueOf(123));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("456.123", resX18);
|
||||
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);
|
||||
Assertions.assertEquals("456.123", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChochChopedNeg456() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberChocoPigChoped(FCFlameNumberTaste.NUMBER_NEGATIVE, BigInteger.valueOf(789), BigInteger.valueOf(123));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("-789.123", resX18);
|
||||
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);
|
||||
Assertions.assertEquals("-789.123", res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,23 +41,23 @@ public class StenoNumberChocoDecimalTest {
|
|||
|
||||
@Test
|
||||
public void testChocoDecimal456() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberChocoPigDecimal(FCFlameNumberTaste.NUMBER_POSITIVE, false, BigInteger.valueOf(123), BigInteger.valueOf(456));
|
||||
Assertions.assertEquals(4, outX18.size());
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("(-1)⁰*10¹²³*456", resX18);
|
||||
List<Integer> out = new ArrayList<>();
|
||||
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);
|
||||
Assertions.assertEquals("(-1)⁰*10¹²³*456", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChocoDecimalValuesMax() throws Exception {
|
||||
Assertions.assertEquals(283, FourCornerZionStenoPetroglyphs.BIG_BITS_283.toString(2).length());
|
||||
Assertions.assertEquals(2016, FourCornerZionStenoPetroglyphs.BIG_BITS_2016.toString(2).length());
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberChocoPigDecimal(FCFlameNumberTaste.NUMBER_POSITIVE, false, FourCornerZionStenoPetroglyphs.BIG_BITS_283, FourCornerZionStenoPetroglyphs.BIG_BITS_2016);
|
||||
Assertions.assertEquals(193, outX18.size());
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("(-1)⁰*10¹⁵⁵⁴¹³⁵¹¹³⁷⁸⁰⁵⁸³²⁵⁶⁷³⁵⁵⁶⁹⁵²⁵⁴⁵⁸⁸¹⁵¹²⁵³¹³⁹²⁵⁴⁷¹²⁴¹⁷¹¹⁶¹⁷⁰⁰¹⁴⁴⁹⁹²⁷⁷⁹¹¹²³⁴²⁸¹⁶⁴¹⁶⁶⁷⁹⁸⁵⁴⁰⁷*7524389324549354450012295667238056650488661292408472865850279440061341770661038088891003609523855490537527473858068236032063038821912119420032983735773778315780422968627185582125139830259059580693966159220800634538007951025529707819651368618588002973837229854435730968342995245834129352264002058451047722604571453619205472623157541916371455764131661512732115122042085430429090324954236930736866452001076451671762299658372499364800367306988138217572983729940207496105489713305332746758395131148149101871456611571055068153665866066783899124296271513772531723497342815490725823828326183977758546404902789185535", resX18);
|
||||
List<Integer> out = new ArrayList<>();
|
||||
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);
|
||||
Assertions.assertEquals("(-1)⁰*10¹⁵⁵⁴¹³⁵¹¹³⁷⁸⁰⁵⁸³²⁵⁶⁷³⁵⁵⁶⁹⁵²⁵⁴⁵⁸⁸¹⁵¹²⁵³¹³⁹²⁵⁴⁷¹²⁴¹⁷¹¹⁶¹⁷⁰⁰¹⁴⁴⁹⁹²⁷⁷⁹¹¹²³⁴²⁸¹⁶⁴¹⁶⁶⁷⁹⁸⁵⁴⁰⁷*7524389324549354450012295667238056650488661292408472865850279440061341770661038088891003609523855490537527473858068236032063038821912119420032983735773778315780422968627185582125139830259059580693966159220800634538007951025529707819651368618588002973837229854435730968342995245834129352264002058451047722604571453619205472623157541916371455764131661512732115122042085430429090324954236930736866452001076451671762299658372499364800367306988138217572983729940207496105489713305332746758395131148149101871456611571055068153665866066783899124296271513772531723497342815490725823828326183977758546404902789185535", res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,19 +41,19 @@ public class StenoNumberChocoFloatTest {
|
|||
|
||||
@Test
|
||||
public void testChochFloat123() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberChocoPigFloat(FCFlameNumberTaste.NUMBER_NEGATIVE, false, BigInteger.valueOf(456), BigInteger.valueOf(123));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("(-1)¹*2⁴⁵⁶*1.123", resX18);
|
||||
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);
|
||||
Assertions.assertEquals("(-1)¹*2⁴⁵⁶*1.123", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChochFloatNeg456() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
writerX18.strobeNumberChocoPigFloat(FCFlameNumberTaste.NUMBER_POSITIVE, true, BigInteger.valueOf(456), BigInteger.valueOf(789));
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("(-1)⁰*2⁻⁴⁵⁶*1.789", resX18);
|
||||
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);
|
||||
Assertions.assertEquals("(-1)⁰*2⁻⁴⁵⁶*1.789", res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,43 +43,43 @@ public class StenoNumberChocoRationalTest {
|
|||
|
||||
@Test
|
||||
public void testChocoRationalValues() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
BigInteger v1 = BigInteger.valueOf(123);
|
||||
writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v1);
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v1);
|
||||
BigInteger v2 = BigInteger.valueOf(12345);
|
||||
writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v2);
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v2);
|
||||
BigInteger v3 = BigInteger.valueOf(5432);
|
||||
writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_NEGATIVE, FCFlameNumberTaste.NUMBER_NEGATIVE, v3, v3);
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertEquals("¹/₁₂₃¹/₁₂₃₄₅⁻⁵⁴³²/₋₅₄₃₂", resX18);
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_NEGATIVE, FCFlameNumberTaste.NUMBER_NEGATIVE, v3, v3);
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertEquals("¹/₁₂₃¹/₁₂₃₄₅⁻⁵⁴³²/₋₅₄₃₂", res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChocoRationalCount1024() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
for (int x = 1; x <= 1025; x++) {
|
||||
BigInteger v = BigInteger.valueOf(x);
|
||||
writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v);
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, BigInteger.ONE, v);
|
||||
}
|
||||
String resX18 = FourCornerUnicodeDisplay.text().renderFromInt18(outX18);
|
||||
Assertions.assertTrue(resX18.startsWith("¹/₁¹/₂¹/₃"), "missing " + resX18);
|
||||
Assertions.assertTrue(resX18.contains("¹/₅₁₂¹/₅₁₃¹/₅₁₄"), "missing " + resX18);
|
||||
Assertions.assertTrue(resX18.endsWith("¹/₁₀₂₃¹/₁₀₂₄¹/₁₀₂₅"), "missing " + resX18);
|
||||
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
|
||||
Assertions.assertTrue(res.startsWith("¹/₁¹/₂¹/₃"), "missing " + res);
|
||||
Assertions.assertTrue(res.contains("¹/₅₁₂¹/₅₁₃¹/₅₁₄"), "missing " + res);
|
||||
Assertions.assertTrue(res.endsWith("¹/₁₀₂₃¹/₁₀₂₄¹/₁₀₂₅"), "missing " + res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChocoRationalValuesMax() throws Exception {
|
||||
List<Integer> outX18 = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writerX18 = FourCornerZionStenoGrapher.writerFC18(outX18);
|
||||
List<Integer> out = new ArrayList<>();
|
||||
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerFC18(out);
|
||||
BigInteger maxValue = FourCornerZionStenoPetroglyphs.BIG_BITS_1148;
|
||||
writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue, maxValue);
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue, maxValue);
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue, maxValue.add(BigInteger.ONE));
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue, maxValue.add(BigInteger.ONE));
|
||||
});
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
writerX18.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue.add(BigInteger.ONE), maxValue);
|
||||
writer.strobeNumberChocoPigRational(FCFlameNumberTaste.NUMBER_POSITIVE, FCFlameNumberTaste.NUMBER_POSITIVE, maxValue.add(BigInteger.ONE), maxValue);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue