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

Unified Diff: tests/compiler/dart2js/cpa_inference_test.dart

Issue 14997006: Introduce a UnionTypeMask, currently limited to 4 types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/cpa_inference_test.dart
===================================================================
--- tests/compiler/dart2js/cpa_inference_test.dart (revision 23010)
+++ tests/compiler/dart2js/cpa_inference_test.dart (working copy)
@@ -1255,8 +1255,9 @@
Expect.equals(convert(singleton(a).union(singleton(b)).union(nullSingleton)),
new TypeMask.subclass(a.rawType));
- Expect.equals(convert(singleton(b).union(singleton(d))),
- new TypeMask.nonNullSubtype(a.rawType));
+ Expect.equals(
+ convert(singleton(b).union(singleton(d))).simplify(result.compiler),
+ new TypeMask.nonNullSubtype(a.rawType));
}
testSelectors() {
@@ -1302,7 +1303,7 @@
Selector foo = new Selector.call(buildSourceString("foo"), null, 0);
Expect.equals(
- inferredType(foo),
+ inferredType(foo).simplify(result.compiler),
new TypeMask.nonNullSubclass(abc.rawType));
Expect.equals(
inferredType(new TypedSelector.subclass(x.rawType, foo)),
@@ -1314,7 +1315,8 @@
inferredType(new TypedSelector.subclass(z.rawType, foo)),
new TypeMask.nonNullExact(a.rawType));
Expect.equals(
- inferredType(new TypedSelector.subclass(xy.rawType, foo)),
+ inferredType(new TypedSelector.subclass(
+ xy.rawType, foo)).simplify(result.compiler),
new TypeMask.nonNullSubclass(bc.rawType));
Selector bar = new Selector.call(buildSourceString("bar"), null, 0);
« no previous file with comments | « tests/compiler/dart2js/call_site_type_inferer_test.dart ('k') | tests/compiler/dart2js/field_type_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698