FC18: Added pepper tests and deleted E10 support for FC6
This commit is contained in:
parent
2efd06a713
commit
c0d16aa4ab
9 changed files with 70 additions and 245 deletions
|
|
@ -32,7 +32,6 @@ import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash26;
|
|||
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash10;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||
import org.x4o.fc18.cake2.zero33.dec1.FCDotCMD5401Dash2D;
|
||||
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC0801DashE10;
|
||||
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||
import org.x4o.fc18.cake2.zero33.dec1.FCDotINC0801DashP8;
|
||||
|
||||
|
|
@ -94,35 +93,6 @@ public class FourCornerUnicodeDisplayTest {
|
|||
|
||||
Assertions.assertEquals("B3K", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
}
|
||||
/*
|
||||
@Test
|
||||
public void testUnicode() throws Exception {
|
||||
List<Integer> cdc = new ArrayList<>();
|
||||
cdc.add(FCDotCDC1604DashP6.NX23_W.ordinal());
|
||||
cdc.add(FCDotCDC1604DashP6.NY09_EQUALS.ordinal());
|
||||
cdc.addAll(FourCornerRecipe.embedUNI2K("©Δ∞ 仙上主天"));
|
||||
cdc.add(FCDotCDC1604DashP6.NY20_PLUS.ordinal());
|
||||
cdc.addAll(FourCornerRecipe.embedUNI2K("𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡 𑀪𑀸𑀕"));
|
||||
cdc.add(FCDotCDC1604DashP6.NY14_SEMICOLON.ordinal());
|
||||
//cdc.add(FCDotCDC1604DashP6._NEWLINE.ordinal());
|
||||
|
||||
String outputExpected = "W=©Δ∞ 仙上主天+𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡 𑀪𑀸𑀕;";
|
||||
Assertions.assertEquals(outputExpected, FourCornerUnicodeDisplay.text().renderFromInt18(cdc));
|
||||
|
||||
int bitsUTF8 = outputExpected.getBytes(StandardCharsets.UTF_8).length*8;
|
||||
int bitsFC18 = cdc.size()*18;
|
||||
Assertions.assertTrue(bitsFC18 < bitsUTF8, "FC18 is not smaller");
|
||||
|
||||
//List<Integer> cdc6 = FourCornerRecipe.embedFC18(cdc);
|
||||
//Assertions.assertEquals(outputExpected, FourCornerUnicodeDisplay.text().renderFromInt18(cdc6));
|
||||
//Assertions.assertTrue(cdc6.size() > cdc.size(), "FCx6 is not bigger");
|
||||
|
||||
System.out.println("size FC18="+cdc.size());
|
||||
System.out.println("size 0x21="+outputExpected.length());
|
||||
System.out.println("size UTF8="+outputExpected.getBytes(StandardCharsets.UTF_8).length);
|
||||
//System.out.println("size FCx6="+cdc6.size());
|
||||
//System.out.println("raw FCx6="+FourCornerUnicodeDisplay.raw().renderFromInt18(cdc6));
|
||||
}*/
|
||||
|
||||
@Test
|
||||
public void testDec2PieText() throws Exception {
|
||||
|
|
@ -197,33 +167,4 @@ public class FourCornerUnicodeDisplayTest {
|
|||
// Assertions.assertEquals("𝘩𝘰𝘪╗╞╘hoi", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
Assertions.assertEquals("╗╞╘hoi", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDecE10RangeChecks() throws Exception {
|
||||
List<FourCornerX06BaklavaPointSequence> cdc = new ArrayList<>();
|
||||
cdc.add(FCDotDEC2701DashPX0.ESC_DEC0801_E10);
|
||||
cdc.add(FCDotDEC0801DashE10.E10_UWU0101_S1);
|
||||
cdc.add(FCDotCDC1604DashP6.NX08_H); // H
|
||||
cdc.add(FCDotDEC2701DashPX0.ESC_DEC0801_E10);
|
||||
cdc.add(FCDotDEC0801DashE10.E10_UWU0101_S1);
|
||||
cdc.add(FCDotCDC1604DashP6._SALAH_INTERROBANG);
|
||||
cdc.add(FCDotCDC1604DashP6.NX15_O); // O
|
||||
cdc.add(FCDotDEC2701DashPX0.ESC_DEC0801_E10);
|
||||
cdc.add(FCDotDEC0801DashE10.E10_UWU0101_S1);
|
||||
cdc.add(FCDotDEC2701DashPX0.ESC_STOP);
|
||||
cdc.add(FCDotCDC1604DashP6.NX09_I); // I
|
||||
cdc.add(FCDotDEC2701DashPX0.ESC_DEC0801_E10);
|
||||
cdc.add(FCDotDEC0801DashE10.E10_UWU0101_S1);
|
||||
cdc.add(FCDotCDC1604DashP6.NX01_A); // T001__ONE
|
||||
cdc.add(FCDotCDC1604DashP6._SALAH_INTERROBANG);
|
||||
cdc.add(FCDotCDC1604DashP6.NX08_H); // HOI
|
||||
cdc.add(FCDotCDC1604DashP6.NX15_O);
|
||||
cdc.add(FCDotCDC1604DashP6.NX09_I);
|
||||
cdc.add(FCDotDEC2701DashPX0.ESC_DEC0801_E10);
|
||||
cdc.add(FCDotDEC0801DashE10.E10_UWU0101_S1);
|
||||
cdc.add(FCDotCDC1604DashP6.NX02_B); // B
|
||||
cdc.add(FCDotCDC1604DashP6._SALAH_INTERROBANG); // with ! as we droped out of escape mode by B being to large
|
||||
|
||||
Assertions.assertEquals("HOIT001__ONEHOIB‽", FourCornerUnicodeDisplay.text().renderFromX06(cdc));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import java.util.Map;
|
|||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.x4o.fc18.FourCornerUnicodeDisplay;
|
||||
|
||||
/**
|
||||
* Tests FCDotCDC1604DashP6 encoding.
|
||||
|
|
@ -52,4 +53,27 @@ public class FCDotCDC1604DashP6Test {
|
|||
Assertions.assertTrue(global.size() > 1);
|
||||
Assertions.assertFalse(duplicate, "Duplicate ascii core value detected");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testPepper3Points() throws Exception {
|
||||
Assertions.assertEquals("!!!", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWritePoints(0)));
|
||||
Assertions.assertEquals("!!?", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWritePoints(1)));
|
||||
Assertions.assertEquals("!?!", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWritePoints(2)));
|
||||
Assertions.assertEquals("!??", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWritePoints(3)));
|
||||
Assertions.assertEquals("?!!", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWritePoints(4)));
|
||||
Assertions.assertEquals("?!?", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWritePoints(5)));
|
||||
Assertions.assertEquals("??!", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWritePoints(6)));
|
||||
Assertions.assertEquals("???", FourCornerUnicodeDisplay.text().renderFromInt18(FCDotCDC1604DashP6.pepper3SequenceWritePoints(7)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPepper3PointsRange() throws Exception {
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
FCDotCDC1604DashP6.pepper3SequenceWritePoints(-1);
|
||||
});
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
FCDotCDC1604DashP6.pepper3SequenceWritePoints(8);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package org.x4o.fc18.cake2.zero33;
|
||||
package org.x4o.fc18.cake2.zero33.dec1;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||
|
||||
/**
|
||||
* Tests DEC encoding.
|
||||
|
|
@ -34,7 +34,7 @@ import org.x4o.fc18.cake2.zero33.dec1.FCDotDEC2701DashPX0;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Jan 08, 2025
|
||||
*/
|
||||
public class FCDotDEC0127DashPX0Test {
|
||||
public class FCDotDEC2701DashPX0Test {
|
||||
|
||||
@Test
|
||||
public void testSize() throws Exception {
|
||||
|
|
@ -20,14 +20,37 @@
|
|||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package org.x4o.fc18;
|
||||
package org.x4o.fc18.cake2.zero33.dec1;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||
|
||||
/**
|
||||
* Tests FourCornerRecipe methods.
|
||||
* Tests include LUA pages encoding.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Aug 7, 2025
|
||||
* @version 1.0 Sep 6, 2025
|
||||
*/
|
||||
public class FourCornerRecipeTest {
|
||||
public class FCDotINC0801DashP8Test {
|
||||
|
||||
@Test
|
||||
public void testSize() throws Exception {
|
||||
Assertions.assertEquals(8, FCDotINC0801DashP8.values().length);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBaklavaSequence() throws Exception {
|
||||
List<Integer> seq = null;
|
||||
seq = FCDotINC0801DashP8.INC_LUA0127_P7D.baklavaPointSequence();
|
||||
Assertions.assertEquals(6, seq.size());
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X2.ordinal(), seq.get(0));
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X3.ordinal(), seq.get(1));
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6._ESC6_X1.ordinal(), seq.get(2));
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_EXCLAMATION.ordinal(), seq.get(3));
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_QUESTION.ordinal(), seq.get(4));
|
||||
Assertions.assertEquals(FCDotCDC1604DashP6._PEPPER_QUESTION.ordinal(), seq.get(5));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue