NameChecker { public boolean isNCNameStartChar(final int codePoint) { return 'a' <= codePoint && codePoint <= 'z' || 'A' <= codePoint && codePoint <= 'Z' || codePoint == '-' || 0xc0 <= codePoint && codePoint <= 0x2ff && codePoint != 0xd7 && codePoint != 0xf7 || 0x370 <= codePoint && codePoint <= 0x1fff && codePoint != 0x37e || codePoint == 0x200c || codePoint == 0x200d || 0x2070 <= codePoint && codePoint <= 0x218f || 0x2c00 <= codePoint && codePoint <= 0x2fef || 0x3001 <= codePoint && codePoint <= 0xd7ff || 0xf900 <= codePoint && codePoint <= 0xfdcf || 0xfdf0 <= codePoint && codePoint <= 0xfffd || 0x10000 <= codePoint && codePoint <= 0xeffff; }  String checkStyleName(final String name); boolean isNameStartChar(final int codePoint); boolean isNameChar(final int codePoint); boolean isNCNameStartChar(final int codePoint); boolean isNCNameChar(final int codePoint);  }
@Test public void testNCNameStartChar() { Assert.assertEquals("'-' | [A-Z] | [a-z] | [#xc0-#xd6] | [#xd8-#xf6] | [#xf8-#x2ff] | " + "[#x370-#x37d] | " + "[#x37f-#x1fff] | [#x200c-#x200d] | [#x2070-#x218f] | [#x2c00-#x2fef] " + "" + "" + "| " + "[#x3001-#xd7ff] | " + "[#xf900-#xfdcf] | [#xfdf0-#xfffd] | [#x10000-#xeffff]", CodePointTester.codePointsAsString(new CodePointTester.CategoryFilter() { @Override public boolean check(final int codePoint) { return NameCheckerTest.this.checker.isNCNameStartChar(codePoint); } })); }