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

Side by Side Diff: tests/compiler/dart2js/union_type_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
« no previous file with comments | « tests/compiler/dart2js/type_mask_test.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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:async_helper/async_helper.dart"; 5 import "package:async_helper/async_helper.dart";
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import "package:compiler/src/types/types.dart"; 7 import "package:compiler/src/types/types.dart";
8 import "package:compiler/src/world.dart"; 8 import "package:compiler/src/world.dart";
9 import 'type_test_helper.dart'; 9 import 'type_test_helper.dart';
10 10
11 main() { 11 main() {
12 asyncTest(() async { 12 asyncTest(() async {
13 TypeEnvironment env = await TypeEnvironment.create( 13 TypeEnvironment env = await TypeEnvironment.create(
14 r""" 14 r"""
15 class A {} 15 class A {}
16 class B {} 16 class B {}
17 """, 17 """,
18 mainSource: r""" 18 mainSource: r"""
19 main() { 19 main() {
20 new A(); 20 new A();
21 new B(); 21 new B();
22 } 22 }
23 """, 23 """,
24 useMockCompiler: false); 24 useMockCompiler: false);
25 ClosedWorld world = env.compiler.openWorld.closeWorld(); 25 ClosedWorld world =
26 env.compiler.openWorld.closeWorld(env.compiler.reporter);
26 FlatTypeMask mask1 = new FlatTypeMask.exact(env.getElement('A')); 27 FlatTypeMask mask1 = new FlatTypeMask.exact(env.getElement('A'));
27 FlatTypeMask mask2 = new FlatTypeMask.exact(env.getElement('B')); 28 FlatTypeMask mask2 = new FlatTypeMask.exact(env.getElement('B'));
28 UnionTypeMask union1 = mask1.nonNullable().union(mask2, world); 29 UnionTypeMask union1 = mask1.nonNullable().union(mask2, world);
29 UnionTypeMask union2 = mask2.nonNullable().union(mask1, world); 30 UnionTypeMask union2 = mask2.nonNullable().union(mask1, world);
30 Expect.equals(union1, union2); 31 Expect.equals(union1, union2);
31 }); 32 });
32 } 33 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/type_mask_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698