OLD | NEW |
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 "../../../sdk/lib/_internal/compiler/implementation/types/types.dart"; | 10 import "package:compiler/implementation/types/types.dart"; |
11 import "../../../sdk/lib/_internal/compiler/implementation/dart_types.dart"; | 11 import "package:compiler/implementation/dart_types.dart"; |
12 | 12 |
13 main() { | 13 main() { |
14 asyncTest(() => MockCompiler.create((MockCompiler compiler) { | 14 asyncTest(() => MockCompiler.create((MockCompiler compiler) { |
15 compiler.intClass.ensureResolved(compiler); | 15 compiler.intClass.ensureResolved(compiler); |
16 compiler.stringClass.ensureResolved(compiler); | 16 compiler.stringClass.ensureResolved(compiler); |
17 | 17 |
18 FlatTypeMask mask1 = | 18 FlatTypeMask mask1 = |
19 new FlatTypeMask.exact(compiler.intClass); | 19 new FlatTypeMask.exact(compiler.intClass); |
20 FlatTypeMask mask2 = | 20 FlatTypeMask mask2 = |
21 new FlatTypeMask.exact(compiler.stringClass); | 21 new FlatTypeMask.exact(compiler.stringClass); |
22 UnionTypeMask union1 = mask1.nonNullable().union(mask2, compiler); | 22 UnionTypeMask union1 = mask1.nonNullable().union(mask2, compiler); |
23 UnionTypeMask union2 = mask2.nonNullable().union(mask1, compiler); | 23 UnionTypeMask union2 = mask2.nonNullable().union(mask1, compiler); |
24 Expect.equals(union1, union2); | 24 Expect.equals(union1, union2); |
25 })); | 25 })); |
26 } | 26 } |
OLD | NEW |