Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Side by Side Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 2304923002: Allow surrogates in string literals. (Closed)
Patch Set: Fixed another test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.generated.parser_test; 5 library analyzer.test.generated.parser_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 parse4("parseForStatement", "for (int a = 0 in foo) {}", 1364 parse4("parseForStatement", "for (int a = 0 in foo) {}",
1365 [ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH]); 1365 [ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH]);
1366 } 1366 }
1367 1367
1368 void test_invalidAwaitInFor() { 1368 void test_invalidAwaitInFor() {
1369 parse4("parseForStatement", "await for (; ;) {}", 1369 parse4("parseForStatement", "await for (; ;) {}",
1370 [ParserErrorCode.INVALID_AWAIT_IN_FOR]); 1370 [ParserErrorCode.INVALID_AWAIT_IN_FOR]);
1371 } 1371 }
1372 1372
1373 void test_invalidCodePoint() { 1373 void test_invalidCodePoint() {
1374 parse4("parseStringLiteral", "'\\uD900'", 1374 parse4("parseStringLiteral", "'\\u{110000}'",
1375 [ParserErrorCode.INVALID_CODE_POINT]); 1375 [ParserErrorCode.INVALID_CODE_POINT]);
1376 } 1376 }
1377 1377
1378 void test_invalidHexEscape_invalidDigit() { 1378 void test_invalidHexEscape_invalidDigit() {
1379 parse4( 1379 parse4(
1380 "parseStringLiteral", "'\\x0 a'", [ParserErrorCode.INVALID_HEX_ESCAPE]); 1380 "parseStringLiteral", "'\\x0 a'", [ParserErrorCode.INVALID_HEX_ESCAPE]);
1381 } 1381 }
1382 1382
1383 void test_invalidHexEscape_tooFewDigits() { 1383 void test_invalidHexEscape_tooFewDigits() {
1384 parse4( 1384 parse4(
(...skipping 9621 matching lines...) Expand 10 before | Expand all | Expand 10 after
11006 new Scanner(null, new CharSequenceReader(source), listener); 11006 new Scanner(null, new CharSequenceReader(source), listener);
11007 Token tokenStream = scanner.tokenize(); 11007 Token tokenStream = scanner.tokenize();
11008 // 11008 //
11009 // Parse the source. 11009 // Parse the source.
11010 // 11010 //
11011 Parser parser = new Parser(null, listener); 11011 Parser parser = new Parser(null, listener);
11012 return invokeParserMethodImpl( 11012 return invokeParserMethodImpl(
11013 parser, methodName, <Object>[tokenStream], tokenStream) as Token; 11013 parser, methodName, <Object>[tokenStream], tokenStream) as Token;
11014 } 11014 }
11015 } 11015 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698