ICU-12549 Adding coverage for SpoofChecker.Builder copy constructor

X-SVN-Rev: 39247
This commit is contained in:
Shane Carr 2016-09-15 21:17:07 +00:00
parent 9534ad1cf8
commit f13cbd3030

View file

@ -829,4 +829,14 @@ public class SpoofCheckerTest extends TestFmwk {
fail("Failed while testing ScriptSet: " + e.getClass() + ": " + e.getMessage());
}
}
@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);
}
}