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

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

Issue 1167413005: In constant evaluation, consistently handle const depending on non-const. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/generated/constant.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) 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.all_the_rest_test; 8 library engine.all_the_rest_test;
9 9
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 8103 matching lines...) Expand 10 before | Expand all | Expand 10 after
8114 void setUp() { 8114 void setUp() {
8115 _referenceGraph = new DirectedGraph<ConstantEvaluationTarget>(); 8115 _referenceGraph = new DirectedGraph<ConstantEvaluationTarget>();
8116 _head = ElementFactory.topLevelVariableElement2("v1"); 8116 _head = ElementFactory.topLevelVariableElement2("v1");
8117 } 8117 }
8118 void test_visitSimpleIdentifier_const() { 8118 void test_visitSimpleIdentifier_const() {
8119 _visitNode(_makeTailVariable("v2", true)); 8119 _visitNode(_makeTailVariable("v2", true));
8120 _assertOneArc(_tail); 8120 _assertOneArc(_tail);
8121 } 8121 }
8122 void test_visitSimpleIdentifier_nonConst() { 8122 void test_visitSimpleIdentifier_nonConst() {
8123 _visitNode(_makeTailVariable("v2", false)); 8123 _visitNode(_makeTailVariable("v2", false));
8124 _assertNoArcs(); 8124 _assertOneArc(_tail);
8125 } 8125 }
8126 void test_visitSuperConstructorInvocation_const() { 8126 void test_visitSuperConstructorInvocation_const() {
8127 _visitNode(_makeTailSuperConstructorInvocation("A", true)); 8127 _visitNode(_makeTailSuperConstructorInvocation("A", true));
8128 _assertOneArc(_tail); 8128 _assertOneArc(_tail);
8129 } 8129 }
8130 void test_visitSuperConstructorInvocation_nonConst() { 8130 void test_visitSuperConstructorInvocation_nonConst() {
8131 _visitNode(_makeTailSuperConstructorInvocation("A", false)); 8131 _visitNode(_makeTailSuperConstructorInvocation("A", false));
8132 _assertNoArcs(); 8132 _assertOneArc(_tail);
8133 } 8133 }
8134 void test_visitSuperConstructorInvocation_unresolved() { 8134 void test_visitSuperConstructorInvocation_unresolved() {
8135 SuperConstructorInvocation superConstructorInvocation = 8135 SuperConstructorInvocation superConstructorInvocation =
8136 AstFactory.superConstructorInvocation(); 8136 AstFactory.superConstructorInvocation();
8137 _visitNode(superConstructorInvocation); 8137 _visitNode(superConstructorInvocation);
8138 _assertNoArcs(); 8138 _assertNoArcs();
8139 } 8139 }
8140 void _assertNoArcs() { 8140 void _assertNoArcs() {
8141 Set<ConstantEvaluationTarget> tails = _referenceGraph.getTails(_head); 8141 Set<ConstantEvaluationTarget> tails = _referenceGraph.getTails(_head);
8142 expect(tails, hasLength(0)); 8142 expect(tails, hasLength(0));
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
8752 if (_expectedExternalScriptName == null) { 8752 if (_expectedExternalScriptName == null) {
8753 expect(scriptSource, isNull, reason: "script $scriptIndex"); 8753 expect(scriptSource, isNull, reason: "script $scriptIndex");
8754 } else { 8754 } else {
8755 expect(scriptSource, isNotNull, reason: "script $scriptIndex"); 8755 expect(scriptSource, isNotNull, reason: "script $scriptIndex");
8756 String actualExternalScriptName = scriptSource.shortName; 8756 String actualExternalScriptName = scriptSource.shortName;
8757 expect(actualExternalScriptName, _expectedExternalScriptName, 8757 expect(actualExternalScriptName, _expectedExternalScriptName,
8758 reason: "script $scriptIndex"); 8758 reason: "script $scriptIndex");
8759 } 8759 }
8760 } 8760 }
8761 } 8761 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698