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

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

Issue 12610004: Start using the new union/intersection code for HType.INDEXABLE_PRIMITIVE. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify even further. Created 7 years, 9 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
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/type_combination_test.dart
diff --git a/tests/compiler/dart2js/type_combination_test.dart b/tests/compiler/dart2js/type_combination_test.dart
index ada905ce3b1b6bf08c57cb88ae06ff790aa6bd2a..05d5f94ad7b7320c7f299da114691346628b9b22 100644
--- a/tests/compiler/dart2js/type_combination_test.dart
+++ b/tests/compiler/dart2js/type_combination_test.dart
@@ -32,6 +32,7 @@ HType nonPrimitive2;
HType potentialArray;
HType potentialString;
HType jsArrayOrNull;
+HType jsIndexableOrNull;
void testUnion(MockCompiler compiler) {
Expect.equals(CONFLICTING,
@@ -344,7 +345,7 @@ void testUnion(MockCompiler compiler) {
INDEXABLE_PRIMITIVE.union(INTEGER_OR_NULL, compiler));
Expect.equals(UNKNOWN,
INDEXABLE_PRIMITIVE.union(DOUBLE_OR_NULL, compiler));
- Expect.equals(UNKNOWN,
+ Expect.equals(jsIndexableOrNull,
INDEXABLE_PRIMITIVE.union(STRING_OR_NULL, compiler));
Expect.equals(UNKNOWN,
INDEXABLE_PRIMITIVE.union(NULL, compiler));
@@ -901,7 +902,7 @@ void testUnion(MockCompiler compiler) {
STRING_OR_NULL.union(INTEGER, compiler));
Expect.equals(UNKNOWN,
STRING_OR_NULL.union(DOUBLE, compiler));
- Expect.equals(UNKNOWN,
+ Expect.equals(jsIndexableOrNull,
STRING_OR_NULL.union(INDEXABLE_PRIMITIVE, compiler));
Expect.equals(STRING_OR_NULL,
STRING_OR_NULL.union(STRING, compiler));
@@ -1340,7 +1341,7 @@ void testIntersection(MockCompiler compiler) {
INDEXABLE_PRIMITIVE.intersection(INTEGER_OR_NULL, compiler));
Expect.equals(CONFLICTING,
INDEXABLE_PRIMITIVE.intersection(DOUBLE_OR_NULL, compiler));
- Expect.equals(CONFLICTING,
+ Expect.equals(STRING,
INDEXABLE_PRIMITIVE.intersection(STRING_OR_NULL, compiler));
Expect.equals(CONFLICTING,
INDEXABLE_PRIMITIVE.intersection(NULL, compiler));
@@ -2057,6 +2058,8 @@ void main() {
patternClass.computeType(compiler), compiler);
jsArrayOrNull = new HType.exact(
compiler.backend.jsArrayClass.computeType(compiler), compiler);
+ jsIndexableOrNull = new HType.subtype(
+ compiler.backend.jsIndexableClass.computeType(compiler), compiler);
testUnion(compiler);
testIntersection(compiler);
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698