| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.scanner_test; | 8 library engine.scanner_test; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/java_core.dart'; | 10 import 'package:analyzer/src/generated/java_core.dart'; |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // "a + b; " | 263 // "a + b; " |
| 264 // "a + b; " | 264 // "a + b; " |
| 265 _scan("a + b; ", "", " ", ""); | 265 _scan("a + b; ", "", " ", ""); |
| 266 _assertTokens(3, 4, ["a", "+", "b", ";"]); | 266 _assertTokens(3, 4, ["a", "+", "b", ";"]); |
| 267 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange); | 267 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void test_insert_whitespace_withMultipleComments() { | 270 void test_insert_whitespace_withMultipleComments() { |
| 271 // "//comment", "//comment2", "a + b;" | 271 // "//comment", "//comment2", "a + b;" |
| 272 // "//comment", "//comment2", "a + b;" | 272 // "//comment", "//comment2", "a + b;" |
| 273 _scan(EngineTestCase.createSource(["//comment", "//comment2", "a"]), "", " "
, " + b;"); | 273 _scan(r''' |
| 274 //comment |
| 275 //comment2 |
| 276 a''', "", " ", " + b;"); |
| 274 _assertTokens(1, 2, ["a", "+", "b", ";"]); | 277 _assertTokens(1, 2, ["a", "+", "b", ";"]); |
| 275 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange); | 278 JUnitTestCase.assertFalse(_incrementalScanner.hasNonWhitespaceChange); |
| 276 } | 279 } |
| 277 | 280 |
| 278 void test_replace_identifier_beginning() { | 281 void test_replace_identifier_beginning() { |
| 279 // "bell + b;" | 282 // "bell + b;" |
| 280 // "fell + b;") | 283 // "fell + b;") |
| 281 _scan("", "b", "f", "ell + b;"); | 284 _scan("", "b", "f", "ell + b;"); |
| 282 _assertTokens(-1, 1, ["fell", "+", "b", ";"]); | 285 _assertTokens(-1, 1, ["fell", "+", "b", ";"]); |
| 283 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange); | 286 JUnitTestCase.assertTrue(_incrementalScanner.hasNonWhitespaceChange); |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1634 } | 1637 } |
| 1635 | 1638 |
| 1636 main() { | 1639 main() { |
| 1637 _ut.groupSep = ' | '; | 1640 _ut.groupSep = ' | '; |
| 1638 runReflectiveTests(CharSequenceReaderTest); | 1641 runReflectiveTests(CharSequenceReaderTest); |
| 1639 runReflectiveTests(IncrementalScannerTest); | 1642 runReflectiveTests(IncrementalScannerTest); |
| 1640 runReflectiveTests(KeywordStateTest); | 1643 runReflectiveTests(KeywordStateTest); |
| 1641 runReflectiveTests(ScannerTest); | 1644 runReflectiveTests(ScannerTest); |
| 1642 runReflectiveTests(TokenTypeTest); | 1645 runReflectiveTests(TokenTypeTest); |
| 1643 } | 1646 } |
| OLD | NEW |