| Index: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| index 4f9415ad7e07ebda38ff36419bc5f27619c25966..93c8c8966f229c434ad72fa1e0c34f84eb66d947 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| @@ -1571,6 +1571,14 @@ public class SyntaxTest extends AbstractParserTest {
|
| "}"),
|
| ParserErrorCode.FOR_IN_WITH_VARIABLE_INITIALIZER, 2, 18);
|
| }
|
| +
|
| + public void test_forIn_withConst() throws Exception {
|
| + parseUnit("test.dart",
|
| + Joiner.on("\n").join(
|
| + "main() {",
|
| + " for (const v in a) { }",
|
| + "}"));
|
| + }
|
|
|
| public void test_varInFunctionType() throws Exception {
|
| parseUnit("phony_var_in_function_type.dart",
|
| @@ -1591,4 +1599,29 @@ public class SyntaxTest extends AbstractParserTest {
|
| ""),
|
| ParserErrorCode.EXPORT_WITHOUT_LIBRARY_DIRECTIVE, 2, 1);
|
| }
|
| +
|
| + public void test_unicodeNormalizedFormC_inString() throws Exception {
|
| + byte bytes[] = new byte[] {
|
| + (byte) 0x76,
|
| + (byte) 0x61,
|
| + (byte) 0x72,
|
| + (byte) 0x20,
|
| + (byte) 0x73,
|
| + (byte) 0x3D,
|
| + (byte) 0x27,
|
| + (byte) 0x41,
|
| + (byte) 0xCC,
|
| + (byte) 0x8A,
|
| + (byte) 0x27,
|
| + (byte) 0x3B};
|
| + String source = new String(bytes, "UTF-8");
|
| +// {
|
| +// String sourceNormalized = Normalizer.normalize(source, Normalizer.Form.NFC);
|
| +// assertEquals("var s='';", sourceNormalized);
|
| +// }
|
| + DartParserRunner parserRunner = parseSource(source);
|
| + assertErrors(
|
| + parserRunner.getErrors(),
|
| + errEx(ParserErrorCode.INVALID_UNICODE_NORMALIZATION, 1, 8, 1));
|
| + }
|
| }
|
|
|