| 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 analyzer.test.src.summary.summary_common; | 5 library analyzer.test.src.summary.summary_common; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2357 expect(executable.returnType, isNull); | 2357 expect(executable.returnType, isNull); |
| 2358 } | 2358 } |
| 2359 | 2359 |
| 2360 test_constructor_return_type_parameterized() { | 2360 test_constructor_return_type_parameterized() { |
| 2361 UnlinkedExecutable executable = findExecutable('', | 2361 UnlinkedExecutable executable = findExecutable('', |
| 2362 executables: serializeClassText('class C<T, U> { C(); }').executables); | 2362 executables: serializeClassText('class C<T, U> { C(); }').executables); |
| 2363 expect(executable.returnType, isNull); | 2363 expect(executable.returnType, isNull); |
| 2364 } | 2364 } |
| 2365 | 2365 |
| 2366 test_dependencies_export_to_export_unused() { | 2366 test_dependencies_export_to_export_unused() { |
| 2367 // TODO(paulberry): fix this test. | |
| 2368 addNamedSource('/a.dart', 'export "b.dart";'); | 2367 addNamedSource('/a.dart', 'export "b.dart";'); |
| 2369 addNamedSource('/b.dart', ''); | 2368 addNamedSource('/b.dart', ''); |
| 2370 serializeLibraryText('export "a.dart";'); | 2369 serializeLibraryText('export "a.dart";'); |
| 2371 // The main test library depends on b.dart, even though it doesn't | 2370 // The main test library depends on b.dart, even though it doesn't |
| 2372 // re-export any names defined in b.dart, because a change to b.dart might | 2371 // re-export any names defined in b.dart, because a change to b.dart might |
| 2373 // cause it to start exporting a name that the main test library *does* | 2372 // cause it to start exporting a name that the main test library *does* |
| 2374 // use. | 2373 // use. |
| 2375 checkHasDependency(absUri('/b.dart'), 'b.dart'); | 2374 checkHasDependency(absUri('/b.dart'), 'b.dart'); |
| 2376 } | 2375 } |
| 2377 | 2376 |
| 2378 test_dependencies_export_unused() { | 2377 test_dependencies_export_unused() { |
| 2379 // TODO(paulberry): fix this test. | |
| 2380 addNamedSource('/a.dart', ''); | 2378 addNamedSource('/a.dart', ''); |
| 2381 serializeLibraryText('export "a.dart";'); | 2379 serializeLibraryText('export "a.dart";'); |
| 2382 // The main test library depends on a.dart, even though it doesn't | 2380 // The main test library depends on a.dart, even though it doesn't |
| 2383 // re-export any names defined in a.dart, because a change to a.dart might | 2381 // re-export any names defined in a.dart, because a change to a.dart might |
| 2384 // cause it to start exporting a name that the main test library *will* | 2382 // cause it to start exporting a name that the main test library *will* |
| 2385 // re-export. | 2383 // re-export. |
| 2386 checkHasDependency(absUri('/a.dart'), 'a.dart'); | 2384 checkHasDependency(absUri('/a.dart'), 'a.dart'); |
| 2387 } | 2385 } |
| 2388 | 2386 |
| 2389 test_dependencies_import_to_export() { | 2387 test_dependencies_import_to_export() { |
| (...skipping 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4672 */ | 4670 */ |
| 4673 class _PrefixExpectation { | 4671 class _PrefixExpectation { |
| 4674 final ReferenceKind kind; | 4672 final ReferenceKind kind; |
| 4675 final String name; | 4673 final String name; |
| 4676 final bool inLibraryDefiningUnit; | 4674 final bool inLibraryDefiningUnit; |
| 4677 final int numTypeParameters; | 4675 final int numTypeParameters; |
| 4678 | 4676 |
| 4679 _PrefixExpectation(this.kind, this.name, | 4677 _PrefixExpectation(this.kind, this.name, |
| 4680 {this.inLibraryDefiningUnit: false, this.numTypeParameters: 0}); | 4678 {this.inLibraryDefiningUnit: false, this.numTypeParameters: 0}); |
| 4681 } | 4679 } |
| OLD | NEW |