| 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 analyzer.test.generated.all_the_rest_test; | 5 library analyzer.test.generated.all_the_rest_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1735 | 1735 |
| 1736 test_whileStatement_true_throw() async { | 1736 test_whileStatement_true_throw() async { |
| 1737 _assertTrue("{ while (true) { throw ''; } }"); | 1737 _assertTrue("{ while (true) { throw ''; } }"); |
| 1738 } | 1738 } |
| 1739 | 1739 |
| 1740 void _assertFalse(String source) { | 1740 void _assertFalse(String source) { |
| 1741 _assertHasReturn(false, source); | 1741 _assertHasReturn(false, source); |
| 1742 } | 1742 } |
| 1743 | 1743 |
| 1744 void _assertHasReturn(bool expectedResult, String source) { | 1744 void _assertHasReturn(bool expectedResult, String source) { |
| 1745 Statement statement = | 1745 Statement statement = parseStatement(source, enableLazyAssignmentOperators); |
| 1746 parseStatement(source, [], enableLazyAssignmentOperators); | |
| 1747 expect(ExitDetector.exits(statement), expectedResult); | 1746 expect(ExitDetector.exits(statement), expectedResult); |
| 1748 } | 1747 } |
| 1749 | 1748 |
| 1750 void _assertTrue(String source) { | 1749 void _assertTrue(String source) { |
| 1751 _assertHasReturn(true, source); | 1750 _assertHasReturn(true, source); |
| 1752 } | 1751 } |
| 1753 } | 1752 } |
| 1754 | 1753 |
| 1755 /** | 1754 /** |
| 1756 * Tests for the [ExitDetector] that require that the AST be resolved. | 1755 * Tests for the [ExitDetector] that require that the AST be resolved. |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2305 resourceProvider.newFile( | 2304 resourceProvider.newFile( |
| 2306 coreIntPath, | 2305 coreIntPath, |
| 2307 ''' | 2306 ''' |
| 2308 part of dart.core; | 2307 part of dart.core; |
| 2309 '''); | 2308 '''); |
| 2310 sdk = new FolderBasedDartSdk(resourceProvider, sdkFolder); | 2309 sdk = new FolderBasedDartSdk(resourceProvider, sdkFolder); |
| 2311 } | 2310 } |
| 2312 } | 2311 } |
| 2313 | 2312 |
| 2314 class _SourceMock extends TypedMock implements Source {} | 2313 class _SourceMock extends TypedMock implements Source {} |
| OLD | NEW |