Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: pkg/analyzer/test/src/summary/summary_test.dart

Issue 1556123003: Add some forgotten test cases to summary_test. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_test; 5 library analyzer.test.src.summary.summary_test;
6 6
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/src/generated/ast.dart'; 8 import 'package:analyzer/src/generated/ast.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 class E {} 750 class E {}
751 '''); 751 ''');
752 expect(cls.executables, isEmpty); 752 expect(cls.executables, isEmpty);
753 } 753 }
754 754
755 test_class_alias_private() { 755 test_class_alias_private() {
756 serializeClassText('class _C = _D with _E; class _D {} class _E {}', '_C'); 756 serializeClassText('class _C = _D with _E; class _D {} class _E {}', '_C');
757 expect(unlinkedUnits[0].publicNamespace.names, isEmpty); 757 expect(unlinkedUnits[0].publicNamespace.names, isEmpty);
758 } 758 }
759 759
760 test_class_alias_reference_generic() {
761 UnlinkedTypeRef typeRef = serializeTypeText('C',
762 otherDeclarations: 'class C<D, E> = F with G; class F {} class G {}');
763 checkTypeRef(typeRef, null, null, 'C', numTypeParameters: 2);
764 }
765
766 test_class_alias_reference_generic_imported() {
767 addNamedSource(
768 '/lib.dart', 'class C<D, E> = F with G; class F {} class G {}');
769 UnlinkedTypeRef typeRef =
770 serializeTypeText('C', otherDeclarations: 'import "lib.dart";');
771 checkTypeRef(typeRef, absUri('/lib.dart'), 'lib.dart', 'C',
772 numTypeParameters: 2);
773 }
774
760 test_class_alias_supertype() { 775 test_class_alias_supertype() {
761 UnlinkedClass cls = 776 UnlinkedClass cls =
762 serializeClassText('class C = D with E; class D {} class E {}'); 777 serializeClassText('class C = D with E; class D {} class E {}');
763 checkTypeRef(cls.supertype, null, null, 'D'); 778 checkTypeRef(cls.supertype, null, null, 'D');
764 expect(cls.hasNoSupertype, isFalse); 779 expect(cls.hasNoSupertype, isFalse);
765 } 780 }
766 781
767 test_class_concrete() { 782 test_class_concrete() {
768 UnlinkedClass cls = serializeClassText('class C {}'); 783 UnlinkedClass cls = serializeClassText('class C {}');
769 expect(cls.isAbstract, false); 784 expect(cls.isAbstract, false);
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 UnlinkedVariable variable = 2363 UnlinkedVariable variable =
2349 serializeVariableText('int i;', variableName: 'i'); 2364 serializeVariableText('int i;', variableName: 'i');
2350 checkTypeRef(variable.type, 'dart:core', 'dart:core', 'int'); 2365 checkTypeRef(variable.type, 'dart:core', 'dart:core', 'int');
2351 } 2366 }
2352 2367
2353 test_varible_private() { 2368 test_varible_private() {
2354 serializeVariableText('int _i;', variableName: '_i'); 2369 serializeVariableText('int _i;', variableName: '_i');
2355 expect(unlinkedUnits[0].publicNamespace.names, isEmpty); 2370 expect(unlinkedUnits[0].publicNamespace.names, isEmpty);
2356 } 2371 }
2357 } 2372 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698