Testing 'toCodePoints' function whether it distinguish UTF-8 character

or not.
pull/90/head
minsu4107 5 years ago
parent 601a0de46a
commit 5b2085e2cf

@ -99,4 +99,19 @@ public class testQrSegmentAdvanced {
assertEquals(QrSegmentAdvanced.is_alphanumeric(forcnt), false);
}
}
/**
*Purpose: 'toCodePoints' function is convert String to integer, if String is in UTF-8.
* In UTF-8 has variable character why I haven't check all UTF-8's string.
* So, I just test character that are excluded at UTF-8.
* For checking exception occurs when a character other than UTF-8 is entered.
*Input: "A<>"
*Expected:
* occur IllegalArgumentException
*/
@Test(expected = IllegalArgumentException.class)
public void toCodePoints_test() {
String not_UTF = "A<>";
testing.makeSegmentsOptimally(not_UTF, Ecc.LOW, 1, 40);
}
}

Loading…
Cancel
Save