FC18: Corrected importer method naming regarding FC6 and FC18
This commit is contained in:
parent
b2e883c1b6
commit
fa6dc9ce2c
6 changed files with 39 additions and 44 deletions
|
|
@ -41,7 +41,7 @@ public class FourCornerUnicodeImportTest {
|
|||
|
||||
@Test
|
||||
public void testAsciiUpper() throws Exception {
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToX06("FOOBAR");
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToFC6("FOOBAR");
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
Assertions.assertEquals(6, cdc.size());
|
||||
|
|
@ -58,7 +58,7 @@ public class FourCornerUnicodeImportTest {
|
|||
|
||||
@Test
|
||||
public void testAsciiLower() throws Exception {
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToX06("foobar");
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToFC6("foobar");
|
||||
Iterator<Integer> cdi = cdc.iterator();
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
|
|
@ -80,7 +80,7 @@ public class FourCornerUnicodeImportTest {
|
|||
|
||||
@Test
|
||||
public void testAsciiMixedX06() throws Exception {
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToX06("fooBAR");
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToFC6("fooBAR");
|
||||
Iterator<Integer> cdi = cdc.iterator();
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
|
|
@ -106,7 +106,7 @@ public class FourCornerUnicodeImportTest {
|
|||
|
||||
@Test
|
||||
public void testAsciiMixedX18() throws Exception {
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToX18("fooBAR");
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToFC18("fooBAR");
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
Assertions.assertEquals(6, cdc.size()); // = 108 bit
|
||||
|
|
@ -125,30 +125,30 @@ public class FourCornerUnicodeImportTest {
|
|||
@Test
|
||||
public void testCheckDiacritics() throws Exception {
|
||||
String foobar = "ꞘȍőḆẬř";
|
||||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToX06(foobar);
|
||||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToFC6(foobar);
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
Assertions.assertEquals("FOOBAR", FourCornerUnicodeDisplay.text().renderFromInt18(cdc));
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
FourCornerUnicodeImport.strict().convertToX06(foobar);
|
||||
FourCornerUnicodeImport.strict().convertToFC6(foobar);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCheckMissingChar() throws Exception {
|
||||
String foobar = "FOO\u5432\u5432\u5432";
|
||||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToX06(foobar);
|
||||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToFC6(foobar);
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
Assertions.assertEquals("FOO¿¿¿", FourCornerUnicodeDisplay.text().renderFromInt18(cdc));
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
FourCornerUnicodeImport.strict().convertToX06(foobar);
|
||||
FourCornerUnicodeImport.strict().convertToFC6(foobar);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNumberX06() throws Exception {
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToX06("01201337");
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToFC6("01201337");
|
||||
Iterator<Integer> cdi = cdc.iterator();
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
|
|
@ -172,7 +172,7 @@ public class FourCornerUnicodeImportTest {
|
|||
|
||||
@Test
|
||||
public void testNumberX18() throws Exception {
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToX18("01201337");
|
||||
List<Integer> cdc = FourCornerUnicodeImport.strict().convertToFC18("01201337");
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertFalse(cdc.isEmpty());
|
||||
Assertions.assertEquals(8, cdc.size());
|
||||
|
|
@ -191,7 +191,7 @@ public class FourCornerUnicodeImportTest {
|
|||
|
||||
@Test
|
||||
public void testLineEndings() throws Exception {
|
||||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToX06("A\nB\rC\r\nD\nE\u001B\u0085F\n\r\n\r\r\n");
|
||||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToFC6("A\nB\rC\r\nD\nE\u001B\u0085F\n\r\n\r\r\n");
|
||||
Iterator<Integer> cdi = cdc.iterator();
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertTrue(cdi.hasNext());
|
||||
|
|
@ -220,7 +220,7 @@ public class FourCornerUnicodeImportTest {
|
|||
@Test
|
||||
public void testWhiteSpace() throws Exception {
|
||||
String space16 = "\u3000\u205F\u202F\u200A\u2009\u2008\u2007\u2006\u2005\u2004\u2003\u2002\u2001\u2000\u00A0\u0020";
|
||||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToX06(space16);
|
||||
List<Integer> cdc = FourCornerUnicodeImport.lossy().convertToFC6(space16);
|
||||
Iterator<Integer> cdi = cdc.iterator();
|
||||
Assertions.assertNotNull(cdc);
|
||||
Assertions.assertTrue(cdi.hasNext());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue