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

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

Issue 60733003: Version 0.8.10.6 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 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 "compiler_helper.dart"; 6 import "compiler_helper.dart";
7 import "parser_helper.dart"; 7 import "parser_helper.dart";
8 8
9 import "../../../sdk/lib/_internal/compiler/implementation/types/types.dart"; 9 import "../../../sdk/lib/_internal/compiler/implementation/types/types.dart";
10 import "../../../sdk/lib/_internal/compiler/implementation/dart_types.dart"; 10 import "../../../sdk/lib/_internal/compiler/implementation/dart_types.dart";
11 11
12 main() { 12 main() {
13 Compiler compiler = new MockCompiler(); 13 MockCompiler compiler = new MockCompiler();
14 compiler.intClass.ensureResolved(compiler); 14 compiler.intClass.ensureResolved(compiler);
15 compiler.stringClass.ensureResolved(compiler); 15 compiler.stringClass.ensureResolved(compiler);
16 16
17 FlatTypeMask mask1 = 17 FlatTypeMask mask1 =
18 new FlatTypeMask.exact(compiler.intClass); 18 new FlatTypeMask.exact(compiler.intClass);
19 FlatTypeMask mask2 = 19 FlatTypeMask mask2 =
20 new FlatTypeMask.exact(compiler.stringClass); 20 new FlatTypeMask.exact(compiler.stringClass);
21 UnionTypeMask union1 = mask1.nonNullable().union(mask2, compiler); 21 UnionTypeMask union1 = mask1.nonNullable().union(mask2, compiler);
22 UnionTypeMask union2 = mask2.nonNullable().union(mask1, compiler); 22 UnionTypeMask union2 = mask2.nonNullable().union(mask1, compiler);
23 Expect.equals(union1, union2); 23 Expect.equals(union1, union2);
24 } 24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698