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

Side by Side Diff: pkg/analyzer/test/generated/non_error_resolver_test.dart

Issue 2815713003: Issue 29109. Resynthesize PrefixElement(s) to fix constants evaluation. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.generated.non_error_resolver_test; 5 library analyzer.test.generated.non_error_resolver_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 1304
1305 test_const_dynamic() async { 1305 test_const_dynamic() async {
1306 Source source = addSource(''' 1306 Source source = addSource('''
1307 const Type d = dynamic; 1307 const Type d = dynamic;
1308 '''); 1308 ''');
1309 await computeAnalysisResult(source); 1309 await computeAnalysisResult(source);
1310 assertNoErrors(source); 1310 assertNoErrors(source);
1311 verify([source]); 1311 verify([source]);
1312 } 1312 }
1313 1313
1314 test_const_imported_defaultParameterValue_withImportPrefix() async {
1315 resetWith(options: new AnalysisOptionsImpl()..strongMode = true);
1316 Source source = addNamedSource(
1317 "/a.dart",
1318 r'''
1319 import 'b.dart';
1320 const b = const B();
1321 ''');
1322 addNamedSource(
1323 "/b.dart",
1324 r'''
1325 import 'c.dart' as ccc;
1326 class B {
1327 const B([p = ccc.value]);
1328 }
1329 ''');
1330 addNamedSource(
1331 "/c.dart",
1332 r'''
1333 const int value = 12345;
1334 ''');
1335 await computeAnalysisResult(source);
1336 assertNoErrors(source);
1337 verify([source]);
1338 }
1339
1314 test_constConstructorWithNonConstSuper_explicit() async { 1340 test_constConstructorWithNonConstSuper_explicit() async {
1315 Source source = addSource(r''' 1341 Source source = addSource(r'''
1316 class A { 1342 class A {
1317 const A(); 1343 const A();
1318 } 1344 }
1319 class B extends A { 1345 class B extends A {
1320 const B(): super(); 1346 const B(): super();
1321 }'''); 1347 }''');
1322 await computeAnalysisResult(source); 1348 await computeAnalysisResult(source);
1323 assertNoErrors(source); 1349 assertNoErrors(source);
(...skipping 5018 matching lines...) Expand 10 before | Expand all | Expand 10 after
6342 await computeAnalysisResult(source); 6368 await computeAnalysisResult(source);
6343 assertNoErrors(source); 6369 assertNoErrors(source);
6344 verify([source]); 6370 verify([source]);
6345 reset(); 6371 reset();
6346 } 6372 }
6347 6373
6348 Future<Null> _check_wrongNumberOfParametersForOperator1(String name) async { 6374 Future<Null> _check_wrongNumberOfParametersForOperator1(String name) async {
6349 await _check_wrongNumberOfParametersForOperator(name, "a"); 6375 await _check_wrongNumberOfParametersForOperator(name, "a");
6350 } 6376 }
6351 } 6377 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698