| 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.resolver_test; | 5 library analyzer.test.generated.resolver_test; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| (...skipping 6626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6637 Source source = addSource(r''' | 6637 Source source = addSource(r''' |
| 6638 const bool DEBUG = true; | 6638 const bool DEBUG = true; |
| 6639 f() { | 6639 f() { |
| 6640 bool b = DEBUG || true; | 6640 bool b = DEBUG || true; |
| 6641 }'''); | 6641 }'''); |
| 6642 computeLibrarySourceErrors(source); | 6642 computeLibrarySourceErrors(source); |
| 6643 assertNoErrors(source); | 6643 assertNoErrors(source); |
| 6644 verify([source]); | 6644 verify([source]); |
| 6645 } | 6645 } |
| 6646 | 6646 |
| 6647 void test_deprecatedAnnotationUse_classWithConstructor() { |
| 6648 Source source = addSource(r''' |
| 6649 @deprecated |
| 6650 class C { |
| 6651 C(); |
| 6652 } |
| 6653 '''); |
| 6654 computeLibrarySourceErrors(source); |
| 6655 assertNoErrors(source); |
| 6656 verify([source]); |
| 6657 } |
| 6658 |
| 6647 void test_divisionOptimization() { | 6659 void test_divisionOptimization() { |
| 6648 Source source = addSource(r''' | 6660 Source source = addSource(r''' |
| 6649 f(int x, int y) { | 6661 f(int x, int y) { |
| 6650 var v = x / y.toInt(); | 6662 var v = x / y.toInt(); |
| 6651 }'''); | 6663 }'''); |
| 6652 computeLibrarySourceErrors(source); | 6664 computeLibrarySourceErrors(source); |
| 6653 assertNoErrors(source); | 6665 assertNoErrors(source); |
| 6654 verify([source]); | 6666 verify([source]); |
| 6655 } | 6667 } |
| 6656 | 6668 |
| (...skipping 10227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16884 | 16896 |
| 16885 void _resolveTestUnit(String code) { | 16897 void _resolveTestUnit(String code) { |
| 16886 testCode = code; | 16898 testCode = code; |
| 16887 testSource = addSource(testCode); | 16899 testSource = addSource(testCode); |
| 16888 LibraryElement library = resolve2(testSource); | 16900 LibraryElement library = resolve2(testSource); |
| 16889 assertNoErrors(testSource); | 16901 assertNoErrors(testSource); |
| 16890 verify([testSource]); | 16902 verify([testSource]); |
| 16891 testUnit = resolveCompilationUnit(testSource, library); | 16903 testUnit = resolveCompilationUnit(testSource, library); |
| 16892 } | 16904 } |
| 16893 } | 16905 } |
| OLD | NEW |