| 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 library engine.incremental_scanner_test; | 5 library engine.incremental_scanner_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/incremental_scanner.dart'; | 7 import 'package:analyzer/src/generated/incremental_scanner.dart'; |
| 8 import 'package:analyzer/src/generated/scanner.dart'; | 8 import 'package:analyzer/src/generated/scanner.dart'; |
| 9 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| 11 | 11 |
| 12 import '../reflective_tests.dart'; | 12 import '../reflective_tests.dart'; |
| 13 import 'test_support.dart'; | 13 import 'test_support.dart'; |
| 14 | 14 |
| 15 main() { | 15 main() { |
| 16 groupSep = ' | '; | 16 groupSep = ' | '; |
| 17 runReflectiveTests(IncrementalScannerTest); | 17 runReflectiveTests(IncrementalScannerTest); |
| 18 } | 18 } |
| 19 | 19 |
| 20 @ReflectiveTestCase() | 20 @reflectiveTest |
| 21 class IncrementalScannerTest extends EngineTestCase { | 21 class IncrementalScannerTest extends EngineTestCase { |
| 22 /** | 22 /** |
| 23 * The first token from the token stream resulting from parsing the original | 23 * The first token from the token stream resulting from parsing the original |
| 24 * source, or `null` if [scan] has not been invoked. | 24 * source, or `null` if [scan] has not been invoked. |
| 25 */ | 25 */ |
| 26 Token _originalTokens; | 26 Token _originalTokens; |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * The scanner used to perform incremental scanning, or `null` if [scan] has | 29 * The scanner used to perform incremental scanning, or `null` if [scan] has |
| 30 * not been invoked. | 30 * not been invoked. |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 incrementalToken.type, | 558 incrementalToken.type, |
| 559 same(TokenType.EOF), | 559 same(TokenType.EOF), |
| 560 reason: "Too many tokens"); | 560 reason: "Too many tokens"); |
| 561 expect( | 561 expect( |
| 562 modifiedTokens.type, | 562 modifiedTokens.type, |
| 563 same(TokenType.EOF), | 563 same(TokenType.EOF), |
| 564 reason: "Not enough tokens"); | 564 reason: "Not enough tokens"); |
| 565 // TODO(brianwilkerson) Verify that the errors are correct? | 565 // TODO(brianwilkerson) Verify that the errors are correct? |
| 566 } | 566 } |
| 567 } | 567 } |
| OLD | NEW |