void () { doTest("\"", "STRING_LITERAL ('\"')"); doTest("\" ", "STRING_LITERAL ('\" ')"); doTest("\"\"", "STRING_LITERAL ('\"\"')"); doTest("\"\" ", "STRING_LITERAL ('\"\"')\nWHITE_SPACE (' ')"); doTest("\"x\n ", "STRING_LITERAL ('\"x')\nWHITE_SPACE ('\\n ')"); doTest("\"\\\"\" ", "STRING_LITERAL ('\"\\\"\"')\nWHITE_SPACE (' ')"); doTest("\"\\", "STRING_LITERAL ('\"\\')"); doTest("\"\\u", "STRING_LITERAL ('\"\\u')"); doTest("\"\n\"", "STRING_LITERAL ('\"')\nWHITE_SPACE ('\\n')\nSTRING_LITERAL ('\"')"); doTest("\"\\n\" ", "STRING_LITERAL ('\"\\n\"')\nWHITE_SPACE (' ')"); doTest("\"\\uuuuuu005c\"\" ", "STRING_LITERAL ('\"\\uuuuuu005c\"\"')\nWHITE_SPACE (' ')"); doTest("\"\\u005c\"\" ", "STRING_LITERAL ('\"\\u005c\"\"')\nWHITE_SPACE (' ')"); doTest("\"\\u005\" ", "STRING_LITERAL ('\"\\u005\"')\nWHITE_SPACE (' ')"); // broken unicode escape doTest("\"\\u00\" ", "STRING_LITERAL ('\"\\u00\"')\nWHITE_SPACE (' ')"); // broken unicode escape doTest("\"\\u0\" ", "STRING_LITERAL ('\"\\u0\"')\nWHITE_SPACE (' ')"); // broken unicode escape doTest("\"\\u\" ", "STRING_LITERAL ('\"\\u\"')\nWHITE_SPACE (' ')"); // broken unicode escape // see also com.intellij.java.codeInsight.daemon.LightAdvHighlightingTest#testStringLiterals doTest(" \"\\u000a\" ", "WHITE_SPACE (' ')\nSTRING_LITERAL ('\"\\u000a\"')\nWHITE_SPACE (' ')"); }