| 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/error/listener.dart'; | 9 import 'package:analyzer/error/listener.dart'; |
| 10 import 'package:analyzer/src/dart/scanner/reader.dart'; | 10 import 'package:analyzer/src/dart/scanner/reader.dart'; |
| (...skipping 9256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9267 } | 9267 } |
| 9268 | 9268 |
| 9269 test_public_namespace_of_part() { | 9269 test_public_namespace_of_part() { |
| 9270 addNamedSource('/a.dart', 'part of foo; class C {}'); | 9270 addNamedSource('/a.dart', 'part of foo; class C {}'); |
| 9271 serializeLibraryText('library foo; part "a.dart";'); | 9271 serializeLibraryText('library foo; part "a.dart";'); |
| 9272 expect(unlinkedUnits[0].publicNamespace.names, isEmpty); | 9272 expect(unlinkedUnits[0].publicNamespace.names, isEmpty); |
| 9273 expect(unlinkedUnits[1].publicNamespace.names, hasLength(1)); | 9273 expect(unlinkedUnits[1].publicNamespace.names, hasLength(1)); |
| 9274 expect(unlinkedUnits[1].publicNamespace.names[0].name, 'C'); | 9274 expect(unlinkedUnits[1].publicNamespace.names[0].name, 'C'); |
| 9275 } | 9275 } |
| 9276 | 9276 |
| 9277 test_part_isPartOf() { |
| 9278 addNamedSource('/a.dart', 'part of foo; class C {}'); |
| 9279 serializeLibraryText('library foo; part "a.dart";'); |
| 9280 expect(unlinkedUnits[0].isPartOf, isFalse); |
| 9281 expect(unlinkedUnits[1].isPartOf, isTrue); |
| 9282 } |
| 9283 |
| 9277 test_reference_zero() { | 9284 test_reference_zero() { |
| 9278 // Element zero of the references table should be populated in a standard | 9285 // Element zero of the references table should be populated in a standard |
| 9279 // way. | 9286 // way. |
| 9280 serializeLibraryText(''); | 9287 serializeLibraryText(''); |
| 9281 UnlinkedReference unlinkedReference0 = unlinkedUnits[0].references[0]; | 9288 UnlinkedReference unlinkedReference0 = unlinkedUnits[0].references[0]; |
| 9282 expect(unlinkedReference0.name, ''); | 9289 expect(unlinkedReference0.name, ''); |
| 9283 expect(unlinkedReference0.prefixReference, 0); | 9290 expect(unlinkedReference0.prefixReference, 0); |
| 9284 LinkedReference linkedReference0 = linked.units[0].references[0]; | 9291 LinkedReference linkedReference0 = linked.units[0].references[0]; |
| 9285 expect(linkedReference0.containingReference, 0); | 9292 expect(linkedReference0.containingReference, 0); |
| 9286 expect(linkedReference0.dependency, 0); | 9293 expect(linkedReference0.dependency, 0); |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10344 class _PrefixExpectation { | 10351 class _PrefixExpectation { |
| 10345 final ReferenceKind kind; | 10352 final ReferenceKind kind; |
| 10346 final String name; | 10353 final String name; |
| 10347 final String absoluteUri; | 10354 final String absoluteUri; |
| 10348 final String relativeUri; | 10355 final String relativeUri; |
| 10349 final int numTypeParameters; | 10356 final int numTypeParameters; |
| 10350 | 10357 |
| 10351 _PrefixExpectation(this.kind, this.name, | 10358 _PrefixExpectation(this.kind, this.name, |
| 10352 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); | 10359 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); |
| 10353 } | 10360 } |
| OLD | NEW |