| 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 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/dart/element/type.dart'; | 9 import 'package:analyzer/dart/element/type.dart'; |
| 10 import 'package:analyzer/file_system/physical_file_system.dart'; | 10 import 'package:analyzer/file_system/physical_file_system.dart'; |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 expect(parameter, isNotNull); | 848 expect(parameter, isNotNull); |
| 849 expect(parameter.name, parameterName); | 849 expect(parameter.name, parameterName); |
| 850 expect(parameter.initializer, isNull); | 850 expect(parameter.initializer, isNull); |
| 851 expect(parameter.isConst, isFalse); | 851 expect(parameter.isConst, isFalse); |
| 852 expect(parameter.isFinal, isFalse); | 852 expect(parameter.isFinal, isFalse); |
| 853 expect(parameter.isSynthetic, isFalse); | 853 expect(parameter.isSynthetic, isFalse); |
| 854 expect(parameter.parameterKind, ParameterKind.REQUIRED); | 854 expect(parameter.parameterKind, ParameterKind.REQUIRED); |
| 855 expect(parameter.parameters, hasLength(0)); | 855 expect(parameter.parameters, hasLength(0)); |
| 856 } | 856 } |
| 857 | 857 |
| 858 void test_visitFieldFormalParameter_funtionTyped() { | 858 void test_visitFieldFormalParameter_functionTyped() { |
| 859 ElementHolder holder = new ElementHolder(); | 859 ElementHolder holder = new ElementHolder(); |
| 860 ElementBuilder builder = new ElementBuilder(holder); | 860 ElementBuilder builder = new ElementBuilder(holder); |
| 861 String parameterName = "p"; | 861 String parameterName = "p"; |
| 862 FieldFormalParameter formalParameter = AstFactory.fieldFormalParameter( | 862 FieldFormalParameter formalParameter = AstFactory.fieldFormalParameter( |
| 863 null, | 863 null, |
| 864 null, | 864 null, |
| 865 parameterName, | 865 parameterName, |
| 866 AstFactory | 866 AstFactory |
| 867 .formalParameterList([AstFactory.simpleFormalParameter3("a")])); | 867 .formalParameterList([AstFactory.simpleFormalParameter3("a")])); |
| 868 formalParameter.accept(builder); | 868 formalParameter.accept(builder); |
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2206 (obj) => obj is ConstructorElement, ConstructorElement, element); | 2206 (obj) => obj is ConstructorElement, ConstructorElement, element); |
| 2207 } | 2207 } |
| 2208 | 2208 |
| 2209 void test_locate_Identifier_fieldName() { | 2209 void test_locate_Identifier_fieldName() { |
| 2210 AstNode id = _findNodeIn("x", "class A { var x; }"); | 2210 AstNode id = _findNodeIn("x", "class A { var x; }"); |
| 2211 Element element = ElementLocator.locate(id); | 2211 Element element = ElementLocator.locate(id); |
| 2212 EngineTestCase.assertInstanceOf( | 2212 EngineTestCase.assertInstanceOf( |
| 2213 (obj) => obj is FieldElement, FieldElement, element); | 2213 (obj) => obj is FieldElement, FieldElement, element); |
| 2214 } | 2214 } |
| 2215 | 2215 |
| 2216 void test_locate_Identifier_propertAccess() { | 2216 void test_locate_Identifier_propertyAccess() { |
| 2217 AstNode id = _findNodeIn( | 2217 AstNode id = _findNodeIn( |
| 2218 "length", | 2218 "length", |
| 2219 r''' | 2219 r''' |
| 2220 void main() { | 2220 void main() { |
| 2221 int x = 'foo'.length; | 2221 int x = 'foo'.length; |
| 2222 }'''); | 2222 }'''); |
| 2223 Element element = ElementLocator.locate(id); | 2223 Element element = ElementLocator.locate(id); |
| 2224 EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccessorElement, | 2224 EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccessorElement, |
| 2225 PropertyAccessorElement, element); | 2225 PropertyAccessorElement, element); |
| 2226 } | 2226 } |
| (...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3815 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); | 3815 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); |
| 3816 expect(UriKind.fromEncoding(0x58), same(null)); | 3816 expect(UriKind.fromEncoding(0x58), same(null)); |
| 3817 } | 3817 } |
| 3818 | 3818 |
| 3819 void test_getEncoding() { | 3819 void test_getEncoding() { |
| 3820 expect(UriKind.DART_URI.encoding, 0x64); | 3820 expect(UriKind.DART_URI.encoding, 0x64); |
| 3821 expect(UriKind.FILE_URI.encoding, 0x66); | 3821 expect(UriKind.FILE_URI.encoding, 0x66); |
| 3822 expect(UriKind.PACKAGE_URI.encoding, 0x70); | 3822 expect(UriKind.PACKAGE_URI.encoding, 0x70); |
| 3823 } | 3823 } |
| 3824 } | 3824 } |
| OLD | NEW |