Search in sources :

Example 21 with SpoofChecker

use of android.icu.text.SpoofChecker in project j2objc by google.

the class SpoofCheckerTest method testCopyConstructor.

@Test
public void testCopyConstructor() {
    SpoofChecker sc1 = new SpoofChecker.Builder().setAllowedChars(SpoofChecker.RECOMMENDED).setChecks(SpoofChecker.ALL_CHECKS & ~SpoofChecker.INVISIBLE).build();
    SpoofChecker sc2 = new SpoofChecker.Builder(sc1).build();
    assertEquals("Copy constructor should produce identical instances", sc1, sc2);
}
Also used : SpoofChecker(android.icu.text.SpoofChecker) Test(org.junit.Test)

Aggregations

SpoofChecker (android.icu.text.SpoofChecker)21 Test (org.junit.Test)21 CheckResult (android.icu.text.SpoofChecker.CheckResult)10 UnicodeSet (android.icu.text.UnicodeSet)4 BufferedReader (java.io.BufferedReader)3 IOException (java.io.IOException)3 ULocale (android.icu.util.ULocale)2 Reader (java.io.Reader)2 StringReader (java.io.StringReader)2 ParseException (java.text.ParseException)2 Normalizer2 (android.icu.text.Normalizer2)1 RestrictionLevel (android.icu.text.SpoofChecker.RestrictionLevel)1 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 Locale (java.util.Locale)1 Matcher (java.util.regex.Matcher)1