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

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

Issue 694353007: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
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: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 "compiler_helper.dart"; 7 import "compiler_helper.dart";
8 import "parser_helper.dart"; 8 import "parser_helper.dart";
9 9
10 import "package:compiler/implementation/types/types.dart"; 10 import "package:compiler/src/types/types.dart";
11 import "package:compiler/implementation/dart_types.dart"; 11 import "package:compiler/src/dart_types.dart";
12 12
13 main() { 13 main() {
14 MockCompiler compiler = new MockCompiler.internal(analyzeOnly: true); 14 MockCompiler compiler = new MockCompiler.internal(analyzeOnly: true);
15 asyncTest(() => compiler.runCompiler(null, """ 15 asyncTest(() => compiler.runCompiler(null, """
16 main() { 16 main() {
17 print(2); print("Hello"); 17 print(2); print("Hello");
18 } 18 }
19 """).then((_) { 19 """).then((_) {
20 FlatTypeMask mask1 = 20 FlatTypeMask mask1 =
21 new FlatTypeMask.exact(compiler.intClass); 21 new FlatTypeMask.exact(compiler.intClass);
22 FlatTypeMask mask2 = 22 FlatTypeMask mask2 =
23 new FlatTypeMask.exact(compiler.stringClass); 23 new FlatTypeMask.exact(compiler.stringClass);
24 UnionTypeMask union1 = mask1.nonNullable().union(mask2, compiler.world); 24 UnionTypeMask union1 = mask1.nonNullable().union(mask2, compiler.world);
25 UnionTypeMask union2 = mask2.nonNullable().union(mask1, compiler.world); 25 UnionTypeMask union2 = mask2.nonNullable().union(mask1, compiler.world);
26 Expect.equals(union1, union2); 26 Expect.equals(union1, union2);
27 })); 27 }));
28 } 28 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/type_variable_occurrence_test.dart ('k') | tests/compiler/dart2js/unneeded_part_js_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698