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.all_the_rest_test; | 5 library engine.all_the_rest_test; |
6 | 6 |
7 import 'package:analyzer/file_system/physical_file_system.dart'; | 7 import 'package:analyzer/file_system/physical_file_system.dart'; |
8 import 'package:analyzer/src/generated/ast.dart' hide ConstantEvaluator; | 8 import 'package:analyzer/src/generated/ast.dart' hide ConstantEvaluator; |
9 import 'package:analyzer/src/generated/constant.dart'; | 9 import 'package:analyzer/src/generated/constant.dart'; |
10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
(...skipping 3158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3169 } | 3169 } |
3170 | 3170 |
3171 void test_hasKnownValue_int_unknown() { | 3171 void test_hasKnownValue_int_unknown() { |
3172 expect(_intValue(null).hasKnownValue, isFalse); | 3172 expect(_intValue(null).hasKnownValue, isFalse); |
3173 } | 3173 } |
3174 | 3174 |
3175 void test_hasKnownValue_list_empty() { | 3175 void test_hasKnownValue_list_empty() { |
3176 expect(_listValue().hasKnownValue, isTrue); | 3176 expect(_listValue().hasKnownValue, isTrue); |
3177 } | 3177 } |
3178 | 3178 |
3179 void test_hasKnownValue_list_invalid() { | 3179 void test_hasKnownValue_list_invalidElement() { |
3180 expect(_dynamicValue().hasKnownValue, isTrue); | 3180 expect(_listValue([_dynamicValue]).hasKnownValue, isTrue); |
3181 } | 3181 } |
3182 | 3182 |
3183 void test_hasKnownValue_list_valid() { | 3183 void test_hasKnownValue_list_valid() { |
3184 expect(_listValue([_intValue(23)]).hasKnownValue, isTrue); | 3184 expect(_listValue([_intValue(23)]).hasKnownValue, isTrue); |
3185 } | 3185 } |
3186 | 3186 |
3187 void test_hasKnownValue_map_empty() { | 3187 void test_hasKnownValue_map_empty() { |
3188 expect(_mapValue().hasKnownValue, isTrue); | 3188 expect(_mapValue().hasKnownValue, isTrue); |
3189 } | 3189 } |
3190 | 3190 |
(...skipping 6200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9391 if (_expectedExternalScriptName == null) { | 9391 if (_expectedExternalScriptName == null) { |
9392 expect(scriptSource, isNull, reason: "script $scriptIndex"); | 9392 expect(scriptSource, isNull, reason: "script $scriptIndex"); |
9393 } else { | 9393 } else { |
9394 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); | 9394 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); |
9395 String actualExternalScriptName = scriptSource.shortName; | 9395 String actualExternalScriptName = scriptSource.shortName; |
9396 expect(actualExternalScriptName, _expectedExternalScriptName, | 9396 expect(actualExternalScriptName, _expectedExternalScriptName, |
9397 reason: "script $scriptIndex"); | 9397 reason: "script $scriptIndex"); |
9398 } | 9398 } |
9399 } | 9399 } |
9400 } | 9400 } |
OLD | NEW |