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.resolver_test; | 5 library engine.resolver_test; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'package:analyzer/src/generated/java_core.dart'; | 8 import 'package:analyzer/src/generated/java_core.dart'; |
9 import 'package:analyzer/src/generated/java_engine.dart'; | 9 import 'package:analyzer/src/generated/java_engine.dart'; |
10 import 'package:analyzer/src/generated/java_engine_io.dart'; | 10 import 'package:analyzer/src/generated/java_engine_io.dart'; |
(...skipping 8396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8407 void test_visitPropertyAccess_static_setter() { | 8407 void test_visitPropertyAccess_static_setter() { |
8408 DartType boolType = _typeProvider.boolType; | 8408 DartType boolType = _typeProvider.boolType; |
8409 FieldElementImpl field = ElementFactory.fieldElement("b", false, false, fals
e, boolType); | 8409 FieldElementImpl field = ElementFactory.fieldElement("b", false, false, fals
e, boolType); |
8410 PropertyAccessorElement setter = field.setter; | 8410 PropertyAccessorElement setter = field.setter; |
8411 PropertyAccess node = AstFactory.propertyAccess2(AstFactory.identifier3("a")
, "b"); | 8411 PropertyAccess node = AstFactory.propertyAccess2(AstFactory.identifier3("a")
, "b"); |
8412 node.propertyName.staticElement = setter; | 8412 node.propertyName.staticElement = setter; |
8413 expect(_analyze(node), same(boolType)); | 8413 expect(_analyze(node), same(boolType)); |
8414 _listener.assertNoErrors(); | 8414 _listener.assertNoErrors(); |
8415 } | 8415 } |
8416 | 8416 |
| 8417 void test_visitSimpleIdentifier_dynamic() { |
| 8418 // "dynamic" |
| 8419 SimpleIdentifier identifier = AstFactory.identifier3('dynamic'); |
| 8420 DynamicElementImpl element = DynamicElementImpl.instance; |
| 8421 identifier.staticElement = element; |
| 8422 identifier.staticType = _typeProvider.typeType; |
| 8423 expect(_analyze(identifier), same(_typeProvider.typeType)); |
| 8424 _listener.assertNoErrors(); |
| 8425 } |
| 8426 |
8417 void test_visitSimpleStringLiteral() { | 8427 void test_visitSimpleStringLiteral() { |
8418 // "a" | 8428 // "a" |
8419 Expression node = _resolvedString("a"); | 8429 Expression node = _resolvedString("a"); |
8420 expect(_analyze(node), same(_typeProvider.stringType)); | 8430 expect(_analyze(node), same(_typeProvider.stringType)); |
8421 _listener.assertNoErrors(); | 8431 _listener.assertNoErrors(); |
8422 } | 8432 } |
8423 | 8433 |
8424 void test_visitStringInterpolation() { | 8434 void test_visitStringInterpolation() { |
8425 // "a${'b'}c" | 8435 // "a${'b'}c" |
8426 Expression node = AstFactory.string([ | 8436 Expression node = AstFactory.string([ |
(...skipping 3062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11489 runReflectiveTests(TypeResolverVisitorTest); | 11499 runReflectiveTests(TypeResolverVisitorTest); |
11490 runReflectiveTests(CheckedModeCompileTimeErrorCodeTest); | 11500 runReflectiveTests(CheckedModeCompileTimeErrorCodeTest); |
11491 runReflectiveTests(ErrorResolverTest); | 11501 runReflectiveTests(ErrorResolverTest); |
11492 runReflectiveTests(HintCodeTest); | 11502 runReflectiveTests(HintCodeTest); |
11493 runReflectiveTests(MemberMapTest); | 11503 runReflectiveTests(MemberMapTest); |
11494 runReflectiveTests(NonHintCodeTest); | 11504 runReflectiveTests(NonHintCodeTest); |
11495 runReflectiveTests(SimpleResolverTest); | 11505 runReflectiveTests(SimpleResolverTest); |
11496 runReflectiveTests(StrictModeTest); | 11506 runReflectiveTests(StrictModeTest); |
11497 runReflectiveTests(TypePropagationTest); | 11507 runReflectiveTests(TypePropagationTest); |
11498 } | 11508 } |
OLD | NEW |