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

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

Issue 1839863005: Clean up trivial cycle detection logic. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « pkg/analyzer/lib/src/summary/link.dart ('k') | 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_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/dart/scanner/reader.dart'; 10 import 'package:analyzer/src/dart/scanner/reader.dart';
(...skipping 4130 matching lines...) Expand 10 before | Expand all | Expand 10 after
4141 import 'a.dart' as a; 4141 import 'a.dart' as a;
4142 class C { 4142 class C {
4143 final x; 4143 final x;
4144 const C() : x = a.foo; 4144 const C() : x = a.foo;
4145 } 4145 }
4146 ''', 4146 ''',
4147 allowErrors: true); 4147 allowErrors: true);
4148 checkConstCycle('C', hasCycle: false); 4148 checkConstCycle('C', hasCycle: false);
4149 } 4149 }
4150 4150
4151 test_constructorCycle_trivial() {
4152 serializeLibraryText(
4153 '''
4154 class C {
4155 const C() : this();
4156 }
4157 ''',
4158 allowErrors: true);
4159 checkConstCycle('C');
4160 }
4161
4151 test_constructorCycle_viaFactoryRedirect() { 4162 test_constructorCycle_viaFactoryRedirect() {
4152 serializeLibraryText( 4163 serializeLibraryText(
4153 ''' 4164 '''
4154 class C { 4165 class C {
4155 const C(); 4166 const C();
4156 const factory C.named() = D; 4167 const factory C.named() = D;
4157 } 4168 }
4158 class D extends C { 4169 class D extends C {
4159 final x; 4170 final x;
4160 const D() : x = y; 4171 const D() : x = y;
(...skipping 4115 matching lines...) Expand 10 before | Expand all | Expand 10 after
8276 class _PrefixExpectation { 8287 class _PrefixExpectation {
8277 final ReferenceKind kind; 8288 final ReferenceKind kind;
8278 final String name; 8289 final String name;
8279 final String absoluteUri; 8290 final String absoluteUri;
8280 final String relativeUri; 8291 final String relativeUri;
8281 final int numTypeParameters; 8292 final int numTypeParameters;
8282 8293
8283 _PrefixExpectation(this.kind, this.name, 8294 _PrefixExpectation(this.kind, this.name,
8284 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); 8295 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0});
8285 } 8296 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698