mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-12549 Adding coverage for SpoofChecker.Builder copy constructor
X-SVN-Rev: 39247
This commit is contained in:
parent
9534ad1cf8
commit
f13cbd3030
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue