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

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

Issue 107833002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | tests/language/language_analyzer2.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 3
4 library engine.scanner_test; 4 library engine.scanner_test;
5 5
6 import 'package:analyzer/src/generated/java_core.dart'; 6 import 'package:analyzer/src/generated/java_core.dart';
7 import 'package:analyzer/src/generated/java_junit.dart'; 7 import 'package:analyzer/src/generated/java_junit.dart';
8 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
9 import 'package:analyzer/src/generated/error.dart'; 9 import 'package:analyzer/src/generated/error.dart';
10 import 'package:analyzer/src/generated/scanner.dart'; 10 import 'package:analyzer/src/generated/scanner.dart';
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 354 }
355 355
356 void test_colon() { 356 void test_colon() {
357 assertToken(TokenType.COLON, ":"); 357 assertToken(TokenType.COLON, ":");
358 } 358 }
359 359
360 void test_comma() { 360 void test_comma() {
361 assertToken(TokenType.COMMA, ","); 361 assertToken(TokenType.COMMA, ",");
362 } 362 }
363 363
364 void test_comment_disabled_multi() {
365 Scanner scanner = new Scanner(null, new CharSequenceReader(new CharSequence( "/* comment */ ")), AnalysisErrorListener.NULL_LISTENER);
366 scanner.preserveComments = false;
367 Token token = scanner.tokenize();
368 JUnitTestCase.assertNotNull(token);
369 JUnitTestCase.assertNull(token.precedingComments);
370 }
371
364 void test_comment_multi() { 372 void test_comment_multi() {
365 assertComment(TokenType.MULTI_LINE_COMMENT, "/* comment */"); 373 assertComment(TokenType.MULTI_LINE_COMMENT, "/* comment */");
366 } 374 }
367 375
368 void test_comment_multi_unterminated() { 376 void test_comment_multi_unterminated() {
369 assertError(ScannerErrorCode.UNTERMINATED_MULTI_LINE_COMMENT, 3, "/* x"); 377 assertError(ScannerErrorCode.UNTERMINATED_MULTI_LINE_COMMENT, 3, "/* x");
370 } 378 }
371 379
372 void test_comment_nested() { 380 void test_comment_nested() {
373 assertComment(TokenType.MULTI_LINE_COMMENT, "/* comment /* within a */ comme nt */"); 381 assertComment(TokenType.MULTI_LINE_COMMENT, "/* comment /* within a */ comme nt */");
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 runJUnitTest(__test, __test.test_close_quare_bracket); 1263 runJUnitTest(__test, __test.test_close_quare_bracket);
1256 }); 1264 });
1257 _ut.test('test_colon', () { 1265 _ut.test('test_colon', () {
1258 final __test = new ScannerTest(); 1266 final __test = new ScannerTest();
1259 runJUnitTest(__test, __test.test_colon); 1267 runJUnitTest(__test, __test.test_colon);
1260 }); 1268 });
1261 _ut.test('test_comma', () { 1269 _ut.test('test_comma', () {
1262 final __test = new ScannerTest(); 1270 final __test = new ScannerTest();
1263 runJUnitTest(__test, __test.test_comma); 1271 runJUnitTest(__test, __test.test_comma);
1264 }); 1272 });
1273 _ut.test('test_comment_disabled_multi', () {
1274 final __test = new ScannerTest();
1275 runJUnitTest(__test, __test.test_comment_disabled_multi);
1276 });
1265 _ut.test('test_comment_multi', () { 1277 _ut.test('test_comment_multi', () {
1266 final __test = new ScannerTest(); 1278 final __test = new ScannerTest();
1267 runJUnitTest(__test, __test.test_comment_multi); 1279 runJUnitTest(__test, __test.test_comment_multi);
1268 }); 1280 });
1269 _ut.test('test_comment_multi_unterminated', () { 1281 _ut.test('test_comment_multi_unterminated', () {
1270 final __test = new ScannerTest(); 1282 final __test = new ScannerTest();
1271 runJUnitTest(__test, __test.test_comment_multi_unterminated); 1283 runJUnitTest(__test, __test.test_comment_multi_unterminated);
1272 }); 1284 });
1273 _ut.test('test_comment_nested', () { 1285 _ut.test('test_comment_nested', () {
1274 final __test = new ScannerTest(); 1286 final __test = new ScannerTest();
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
2303 } 2315 }
2304 } 2316 }
2305 2317
2306 main() { 2318 main() {
2307 CharSequenceReaderTest.dartSuite(); 2319 CharSequenceReaderTest.dartSuite();
2308 IncrementalScannerTest.dartSuite(); 2320 IncrementalScannerTest.dartSuite();
2309 KeywordStateTest.dartSuite(); 2321 KeywordStateTest.dartSuite();
2310 ScannerTest.dartSuite(); 2322 ScannerTest.dartSuite();
2311 TokenTypeTest.dartSuite(); 2323 TokenTypeTest.dartSuite();
2312 } 2324 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | tests/language/language_analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698