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

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

Issue 1431513010: Revert "Normalize type masks to use the least upper instantiated subclass/type." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/type_mask2_test.dart » ('j') | 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 3aef5f82eb98e0381bfcd22367aefade83dbc369..17af7f41efbacee4eeeb1d4d19f4c792463a4481 100644
--- a/tests/compiler/dart2js/type_combination_test.dart
+++ b/tests/compiler/dart2js/type_combination_test.dart
@@ -76,9 +76,8 @@ class RuleSet {
var r1 = operate(type1, type2);
var r2 = operate(type2, type1);
- Expect.equals(result, r1,
- "Unexpected result of $name($type1,$type2)");
- Expect.equals(r1, r2, 'Symmetry violation of $name($type1,$type2)');
+ Expect.equals(result, r1);
+ Expect.equals(r1, r2, 'symmetry violation');
}
void check(type1, type2, predicate) {
@@ -732,11 +731,7 @@ void testRegressions(MockCompiler compiler) {
}
void main() {
- asyncTest(() async {
- MockCompiler compiler = new MockCompiler.internal();
- await compiler.init("""
- class PatternImpl implements Pattern {}
- """);
+ asyncTest(() => MockCompiler.create((MockCompiler compiler) {
JavaScriptBackend backend = compiler.backend;
BackendHelpers helpers = backend.helpers;
World world = compiler.world;
@@ -749,9 +744,6 @@ void main() {
compiler.globalDependencies);
}
});
- ClassElement patternImplClass = compiler.mainApp.find('PatternImpl');
- patternImplClass.ensureResolved(compiler.resolution);
-
backend.registerInstantiatedType(
compiler.coreTypes.mapType(),
compiler.enqueuer.resolution,
@@ -760,10 +752,6 @@ void main() {
compiler.coreTypes.functionType,
compiler.enqueuer.resolution,
compiler.globalDependencies);
- backend.registerInstantiatedType(
- patternImplClass.rawType,
- compiler.enqueuer.resolution,
- compiler.globalDependencies);
compiler.world.populate();
// Grab hold of a supertype for String so we can produce potential
@@ -817,15 +805,8 @@ void main() {
dynamicType = new TypeMask.subclass(
compiler.coreClasses.objectClass, world);
- Expect.notEquals(emptyType, nonPrimitive1,
- "nonPrimitive1 expected to be non-empty.");
- Expect.notEquals(jsStringOrNull, potentialString,
- "potentialString expected not to be exact JSString");
- Expect.notEquals(jsArrayOrNull, potentialArray,
- "potentialArray expected not to be JSArray subclass");
-
testUnion(compiler);
testIntersection(compiler);
testRegressions(compiler);
- });
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/type_mask2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698