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

Unified Diff: frog/tests/leg/type_combination_test.dart

Issue 10452032: Merge functionality of HExactType into HBoundedType and fix computation of unions and intersections. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: frog/tests/leg/type_combination_test.dart
diff --git a/frog/tests/leg/type_combination_test.dart b/frog/tests/leg/type_combination_test.dart
index d3430e62b9a65f3d1bfcb7446d490169120bb83f..6d90263625f86021b1d818176bf6f27a29ba13ae 100644
--- a/frog/tests/leg/type_combination_test.dart
+++ b/frog/tests/leg/type_combination_test.dart
@@ -20,8 +20,8 @@ final STRING = HType.STRING;
final READABLE_ARRAY = HType.READABLE_ARRAY;
final MUTABLE_ARRAY = HType.MUTABLE_ARRAY;
final EXTENDABLE_ARRAY = HType.EXTENDABLE_ARRAY;
-final NON_PRIMITIVE1 = const HBoundedType(const Type("type1"));
-final NON_PRIMITIVE2 = const HBoundedType(const Type("type2"));
+final NON_PRIMITIVE1 = const HBoundedType.nonNull(const Type("type1"));
+final NON_PRIMITIVE2 = const HBoundedType.nonNull(const Type("type2"));
final POTENTIAL_ARRAY =
const HBoundedPotentialPrimitiveArray(const Type('type 3'), true);
final POTENTIAL_STRING =
@@ -810,7 +810,7 @@ void testIntersection() {
Expect.equals(CONFLICTING, POTENTIAL_ARRAY.intersection(NON_PRIMITIVE1));
Expect.equals(CONFLICTING, POTENTIAL_ARRAY.intersection(NON_PRIMITIVE2));
Expect.equals(POTENTIAL_ARRAY, POTENTIAL_ARRAY.intersection(POTENTIAL_ARRAY));
- Expect.equals(CONFLICTING, POTENTIAL_ARRAY.intersection(POTENTIAL_STRING));
+ Expect.equals(NULL, POTENTIAL_ARRAY.intersection(POTENTIAL_STRING));
Expect.equals(CONFLICTING, POTENTIAL_ARRAY.intersection(BOOLEAN_OR_NULL));
Expect.equals(CONFLICTING, POTENTIAL_ARRAY.intersection(NUMBER_OR_NULL));
Expect.equals(CONFLICTING, POTENTIAL_ARRAY.intersection(INTEGER_OR_NULL));
@@ -831,7 +831,7 @@ void testIntersection() {
Expect.equals(CONFLICTING, POTENTIAL_STRING.intersection(EXTENDABLE_ARRAY));
Expect.equals(CONFLICTING, POTENTIAL_STRING.intersection(NON_PRIMITIVE1));
Expect.equals(CONFLICTING, POTENTIAL_STRING.intersection(NON_PRIMITIVE2));
- Expect.equals(CONFLICTING, POTENTIAL_STRING.intersection(POTENTIAL_ARRAY));
+ Expect.equals(NULL, POTENTIAL_STRING.intersection(POTENTIAL_ARRAY));
Expect.equals(POTENTIAL_STRING, POTENTIAL_STRING.intersection(POTENTIAL_STRING));
Expect.equals(CONFLICTING, POTENTIAL_STRING.intersection(BOOLEAN_OR_NULL));
Expect.equals(CONFLICTING, POTENTIAL_STRING.intersection(NUMBER_OR_NULL));
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/builder.dart » ('j') | lib/compiler/implementation/ssa/types.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698