| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 test.src.serialization.elements_test; | 5 library test.src.serialization.elements_test; |
| 6 | 6 |
| 7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/element.dart'; | 9 import 'package:analyzer/src/generated/element.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 if (!allowErrors) { | 60 if (!allowErrors) { |
| 61 assertNoErrors(source); | 61 assertNoErrors(source); |
| 62 } | 62 } |
| 63 serializeLibraryElement(library); | 63 serializeLibraryElement(library); |
| 64 expect(unlinked.imports.length, lib.importDependencies.length); | 64 expect(unlinked.imports.length, lib.importDependencies.length); |
| 65 expect(unlinked.references.length, lib.references.length); | 65 expect(unlinked.references.length, lib.references.length); |
| 66 } | 66 } |
| 67 | 67 |
| 68 @override | 68 @override |
| 69 void setUp() { | 69 void setUp() { |
| 70 super.setUp(); |
| 70 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); | 71 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); |
| 71 options.enableGenericMethods = true; | 72 options.enableGenericMethods = true; |
| 72 resetWithOptions(options); | 73 resetWithOptions(options); |
| 73 } | 74 } |
| 74 | 75 |
| 75 test_class_no_superclass() { | 76 test_class_no_superclass() { |
| 76 UnlinkedClass cls = serializeClassElement(typeProvider.objectType.element); | 77 UnlinkedClass cls = serializeClassElement(typeProvider.objectType.element); |
| 77 expect(cls.supertype, isNull); | 78 expect(cls.supertype, isNull); |
| 78 } | 79 } |
| 79 } | 80 } |
| (...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1844 serializeClassText('class C { static int i; }').fields[0]; | 1845 serializeClassText('class C { static int i; }').fields[0]; |
| 1845 expect(variable.isStatic, isTrue); | 1846 expect(variable.isStatic, isTrue); |
| 1846 } | 1847 } |
| 1847 | 1848 |
| 1848 test_variable_type() { | 1849 test_variable_type() { |
| 1849 UnlinkedVariable variable = | 1850 UnlinkedVariable variable = |
| 1850 serializeVariableText('int i;', variableName: 'i'); | 1851 serializeVariableText('int i;', variableName: 'i'); |
| 1851 checkTypeRef(variable.type, 'dart:core', 'dart:core', 'int'); | 1852 checkTypeRef(variable.type, 'dart:core', 'dart:core', 'int'); |
| 1852 } | 1853 } |
| 1853 } | 1854 } |
| OLD | NEW |