--- old/test/jdk/java/lang/Character/CharPropTest.java 2019-08-27 10:57:31.000000000 -0700 +++ new/test/jdk/java/lang/Character/CharPropTest.java 2019-08-27 10:57:31.000000000 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 8202771 8221431 + * @bug 8202771 8221431 8229831 * @summary Check j.l.Character.isDigit/isLetter/isLetterOrDigit/isSpaceChar * /isWhitespace/isTitleCase/isISOControl/isIdentifierIgnorable * /isJavaIdentifierStart/isJavaIdentifierPart/isUnicodeIdentifierStart @@ -182,7 +182,7 @@ private static void isUnicodeIdentifierStartTest(int codePoint, String category) { boolean actual = Character.isUnicodeIdentifierStart(codePoint); - boolean expected = isUnicodeIdentifierStart(category); + boolean expected = isUnicodeIdentifierStart(codePoint, category); if (actual != expected) { printDiff(codePoint, "isUnicodeIdentifierStart", actual, expected); } @@ -266,14 +266,33 @@ || isIdentifierIgnorable(codePoint, category); } - private static boolean isUnicodeIdentifierStart(String category) { - return isLetter(category) || category.equals("Nl"); + private static boolean isUnicodeIdentifierStart(int codePoint, String category) { + return isLetter(category) || category.equals("Nl") + || isOtherIDStart(codePoint); } private static boolean isUnicodeIdentifierPart(int codePoint, String category) { return isLetter(category) || category.equals("Pc") || category.equals("Nd") || category.equals("Nl") || category.equals("Mc") || category.equals("Mn") - || isIdentifierIgnorable(codePoint, category); + || isIdentifierIgnorable(codePoint, category) + || isOtherIDStart(codePoint) + || isOtherIDContinue(codePoint); + } + + private static boolean isOtherIDStart(int codePoint) { + return codePoint == 0x1885 || + codePoint == 0x1886 || + codePoint == 0x2118 || + codePoint == 0x212E || + codePoint == 0x309B || + codePoint == 0x309C; + } + + private static boolean isOtherIDContinue(int codePoint) { + return codePoint == 0x00B7 || + codePoint == 0x0387 || + (codePoint >= 0x1369 && codePoint <= 0x1371) || + codePoint == 0x19DA; } private static void printDiff(int codePoint, String method, boolean actual, boolean expected) {