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

Side by Side Diff: tests/compiler/dart2js/map_tracer_keys_test.dart

Issue 2488353004: Remove Compiler access from ResolutionEnqueuer (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask; 7 import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask;
8 8
9 import 'compiler_helper.dart'; 9 import 'compiler_helper.dart';
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 void doTest( 51 void doTest(
52 {String key: "'d'", 52 {String key: "'d'",
53 String value: "5.5", 53 String value: "5.5",
54 bool bail: false, 54 bool bail: false,
55 bool initial: false}) { 55 bool initial: false}) {
56 Uri uri = new Uri(scheme: 'source'); 56 Uri uri = new Uri(scheme: 'source');
57 var compiler = compilerFor(generateTest(key, value, initial), uri, 57 var compiler = compilerFor(generateTest(key, value, initial), uri,
58 expectedErrors: 0, expectedWarnings: 0); 58 expectedErrors: 0, expectedWarnings: 0);
59 asyncTest(() => compiler.run(uri).then((_) { 59 asyncTest(() => compiler.run(uri).then((_) {
60 var commonMasks = compiler.commonMasks; 60 var commonMasks = compiler.closedWorld.commonMasks;
61 var typesInferrer = compiler.globalInference.typesInferrer; 61 var typesInferrer = compiler.globalInference.typesInferrerInternal;
62 var aDoubleType = 62 var aDoubleType =
63 typesInferrer.getTypeOfElement(findElement(compiler, 'aDouble')); 63 typesInferrer.getTypeOfElement(findElement(compiler, 'aDouble'));
64 var aListType = 64 var aListType =
65 typesInferrer.getTypeOfElement(findElement(compiler, 'aList')); 65 typesInferrer.getTypeOfElement(findElement(compiler, 'aList'));
66 66
67 Expect.equals(aDoubleType, commonMasks.doubleType); 67 Expect.equals(aDoubleType, commonMasks.doubleType);
68 Expect.isTrue(aListType is ContainerTypeMask); 68 Expect.isTrue(aListType is ContainerTypeMask);
69 ContainerTypeMask container = aListType; 69 ContainerTypeMask container = aListType;
70 TypeMask elementType = container.elementType; 70 TypeMask elementType = container.elementType;
71 if (bail) { 71 if (bail) {
72 Expect.equals(elementType, commonMasks.dynamicType); 72 Expect.equals(elementType, commonMasks.dynamicType);
73 } else { 73 } else {
74 Expect.equals(elementType, commonMasks.uint31Type); 74 Expect.equals(elementType, commonMasks.uint31Type);
75 } 75 }
76 })); 76 }));
77 } 77 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/map_tracer_const_test.dart ('k') | tests/compiler/dart2js/map_tracer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698