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

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

Issue 12838003: Rename analyzer-experimental to analyzer_experimental. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 'dart:collection'; 6 import 'dart:collection';
7 import 'package:analyzer-experimental/src/generated/java_core.dart'; 7 import 'package:analyzer_experimental/src/generated/java_core.dart';
8 import 'package:analyzer-experimental/src/generated/java_engine.dart'; 8 import 'package:analyzer_experimental/src/generated/java_engine.dart';
9 import 'package:analyzer-experimental/src/generated/java_junit.dart'; 9 import 'package:analyzer_experimental/src/generated/java_junit.dart';
10 import 'package:analyzer-experimental/src/generated/source.dart'; 10 import 'package:analyzer_experimental/src/generated/source.dart';
11 import 'package:analyzer-experimental/src/generated/error.dart'; 11 import 'package:analyzer_experimental/src/generated/error.dart';
12 import 'package:analyzer-experimental/src/generated/scanner.dart'; 12 import 'package:analyzer_experimental/src/generated/scanner.dart';
13 import 'package:unittest/unittest.dart' as _ut; 13 import 'package:unittest/unittest.dart' as _ut;
14 import 'test_support.dart'; 14 import 'test_support.dart';
15 15
16 class KeywordStateTest extends JUnitTestCase { 16 class KeywordStateTest extends JUnitTestCase {
17 void test_KeywordState() { 17 void test_KeywordState() {
18 List<Keyword> keywords = Keyword.values; 18 List<Keyword> keywords = Keyword.values;
19 int keywordCount = keywords.length; 19 int keywordCount = keywords.length;
20 List<String> textToTest = new List<String>(keywordCount * 3); 20 List<String> textToTest = new List<String>(keywordCount * 3);
21 for (int i = 0; i < keywordCount; i++) { 21 for (int i = 0; i < keywordCount; i++) {
22 String syntax3 = keywords[i].syntax; 22 String syntax3 = keywords[i].syntax;
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 } 1435 }
1436 void validateStream(JavaStringBuilder builder, Token token) { 1436 void validateStream(JavaStringBuilder builder, Token token) {
1437 if (token == null) { 1437 if (token == null) {
1438 return; 1438 return;
1439 } 1439 }
1440 Token previousToken = null; 1440 Token previousToken = null;
1441 int previousEnd = -1; 1441 int previousEnd = -1;
1442 Token currentToken = token; 1442 Token currentToken = token;
1443 while (currentToken != null && currentToken.type != TokenType.EOF) { 1443 while (currentToken != null && currentToken.type != TokenType.EOF) {
1444 validateStream(builder, currentToken.precedingComments); 1444 validateStream(builder, currentToken.precedingComments);
1445 TokenType type29 = currentToken.type; 1445 TokenType type30 = currentToken.type;
1446 if (identical(type29, TokenType.OPEN_CURLY_BRACKET) || identical(type29, T okenType.OPEN_PAREN) || identical(type29, TokenType.OPEN_SQUARE_BRACKET) || iden tical(type29, TokenType.STRING_INTERPOLATION_EXPRESSION)) { 1446 if (identical(type30, TokenType.OPEN_CURLY_BRACKET) || identical(type30, T okenType.OPEN_PAREN) || identical(type30, TokenType.OPEN_SQUARE_BRACKET) || iden tical(type30, TokenType.STRING_INTERPOLATION_EXPRESSION)) {
1447 if (currentToken is! BeginToken) { 1447 if (currentToken is! BeginToken) {
1448 builder.append("\r\nExpected BeginToken, found "); 1448 builder.append("\r\nExpected BeginToken, found ");
1449 builder.append(currentToken.runtimeType.toString()); 1449 builder.append(currentToken.runtimeType.toString());
1450 builder.append(" "); 1450 builder.append(" ");
1451 writeToken(builder, currentToken); 1451 writeToken(builder, currentToken);
1452 } 1452 }
1453 } 1453 }
1454 int currentStart = currentToken.offset; 1454 int currentStart = currentToken.offset;
1455 int currentLength = currentToken.length; 1455 int currentLength = currentToken.length;
1456 int currentEnd = currentStart + currentLength - 1; 1456 int currentEnd = currentStart + currentLength - 1;
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 listener.assertNoErrors(); 2054 listener.assertNoErrors();
2055 return token; 2055 return token;
2056 } 2056 }
2057 } 2057 }
2058 main() { 2058 main() {
2059 CharBufferScannerTest.dartSuite(); 2059 CharBufferScannerTest.dartSuite();
2060 KeywordStateTest.dartSuite(); 2060 KeywordStateTest.dartSuite();
2061 StringScannerTest.dartSuite(); 2061 StringScannerTest.dartSuite();
2062 TokenTypeTest.dartSuite(); 2062 TokenTypeTest.dartSuite();
2063 } 2063 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698