FC18: Converted to choco taste pig numbers

This commit is contained in:
Willem Cazander 2025-09-05 16:13:02 +02:00
parent badf68fc25
commit 0699d23c52
25 changed files with 1314 additions and 864 deletions

View file

@ -29,8 +29,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.x4o.fc18.FourCornerUnicodeDisplay;
import org.x4o.fc18.zion7.FourCornerZion7Candlelier;
import org.x4o.fc18.zion7.FourCornerZion7NumberGram;
import org.x4o.fc18.zion7.FourCornerZionStenoGrapher;
import org.x4o.fc18.zion7.flame4.FCFlameNumberGram;
/**
* Tests txt grams encoding.
@ -44,7 +44,7 @@ public class FCNumberGramTest {
public void testCut10Simple() throws Exception {
List<Integer> out = new ArrayList<>();
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerX18(out);
writer.strobeNumberGrams(FourCornerZion7NumberGram.CUT_10, List.of(0,1,2,3,4,5,6,7,8,9));
writer.strobeNumberGrams(FCFlameNumberGram.CUT_10, List.of(0,1,2,3,4,5,6,7,8,9));
String res = FourCornerUnicodeDisplay.text().renderFromInt18(out);
Assertions.assertEquals("0123456789", res);
}
@ -54,16 +54,16 @@ public class FCNumberGramTest {
List<Integer> out = new ArrayList<>();
FourCornerZion7Candlelier writer = FourCornerZionStenoGrapher.writerX18(out);
Assertions.assertThrows(IllegalArgumentException.class, () -> {
writer.strobeNumberGrams(FourCornerZion7NumberGram.CUT_10, List.of(10));
writer.strobeNumberGrams(FCFlameNumberGram.CUT_10, List.of(10));
});
Assertions.assertThrows(IllegalArgumentException.class, () -> {
writer.strobeNumberGrams(FourCornerZion7NumberGram.CUT_10, List.of(11));
writer.strobeNumberGrams(FCFlameNumberGram.CUT_10, List.of(11));
});
Assertions.assertThrows(IllegalArgumentException.class, () -> {
writer.strobeNumberGrams(FourCornerZion7NumberGram.CUT_10, List.of(-1));
writer.strobeNumberGrams(FCFlameNumberGram.CUT_10, List.of(-1));
});
Assertions.assertThrows(IllegalArgumentException.class, () -> {
writer.strobeNumberGrams(FourCornerZion7NumberGram.CUT_1, List.of(1));
writer.strobeNumberGrams(FCFlameNumberGram.CUT_1, List.of(1));
});
}
}