| OLD | NEW |
| 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 @deprecated | 5 @deprecated |
| 6 library analyzer.test.generated.incremental_scanner_test; | 6 library analyzer.test.generated.incremental_scanner_test; |
| 7 | 7 |
| 8 import 'package:analyzer/dart/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
| 9 import 'package:analyzer/src/dart/scanner/reader.dart'; | 9 import 'package:analyzer/src/dart/scanner/reader.dart'; |
| 10 import 'package:analyzer/src/dart/scanner/scanner.dart'; | 10 import 'package:analyzer/src/dart/scanner/scanner.dart'; |
| 11 import 'package:analyzer/src/generated/engine.dart'; | 11 import 'package:analyzer/src/generated/engine.dart'; |
| 12 import 'package:analyzer/src/generated/incremental_scanner.dart'; | 12 import 'package:analyzer/src/generated/incremental_scanner.dart'; |
| 13 import 'package:analyzer/src/generated/source.dart'; | 13 import 'package:analyzer/src/generated/source.dart'; |
| 14 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 14 import 'package:unittest/unittest.dart'; | 15 import 'package:unittest/unittest.dart'; |
| 15 | 16 |
| 16 import '../reflective_tests.dart'; | |
| 17 import '../utils.dart'; | 17 import '../utils.dart'; |
| 18 import 'test_support.dart'; | 18 import 'test_support.dart'; |
| 19 | 19 |
| 20 main() { | 20 main() { |
| 21 initializeTestEnvironment(); | 21 initializeTestEnvironment(); |
| 22 runReflectiveTests(IncrementalScannerTest); | 22 defineReflectiveTests(IncrementalScannerTest); |
| 23 } | 23 } |
| 24 | 24 |
| 25 @reflectiveTest | 25 @reflectiveTest |
| 26 class IncrementalScannerTest extends EngineTestCase { | 26 class IncrementalScannerTest extends EngineTestCase { |
| 27 /** | 27 /** |
| 28 * The first token from the token stream resulting from parsing the original | 28 * The first token from the token stream resulting from parsing the original |
| 29 * source, or `null` if [scan] has not been invoked. | 29 * source, or `null` if [scan] has not been invoked. |
| 30 */ | 30 */ |
| 31 Token _originalTokens; | 31 Token _originalTokens; |
| 32 | 32 |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 incrementalToken = incrementalToken.next; | 539 incrementalToken = incrementalToken.next; |
| 540 modifiedTokens = modifiedTokens.next; | 540 modifiedTokens = modifiedTokens.next; |
| 541 } | 541 } |
| 542 expect(incrementalToken.type, same(TokenType.EOF), | 542 expect(incrementalToken.type, same(TokenType.EOF), |
| 543 reason: "Too many tokens"); | 543 reason: "Too many tokens"); |
| 544 expect(modifiedTokens.type, same(TokenType.EOF), | 544 expect(modifiedTokens.type, same(TokenType.EOF), |
| 545 reason: "Not enough tokens"); | 545 reason: "Not enough tokens"); |
| 546 // TODO(brianwilkerson) Verify that the errors are correct? | 546 // TODO(brianwilkerson) Verify that the errors are correct? |
| 547 } | 547 } |
| 548 } | 548 } |
| OLD | NEW |