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

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

Issue 1182053010: Revert "Split TypedSelector into Selector and TypeMask." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/compiler_helper.dart ('k') | tests/compiler/dart2js/gvn_dynamic_field_get_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/cpa_inference_test.dart
diff --git a/tests/compiler/dart2js/cpa_inference_test.dart b/tests/compiler/dart2js/cpa_inference_test.dart
index 0d36b717e812a3392242b448bd2c674890e9caba..d22efb7a7c3044d0208436107a08eff74255695c 100644
--- a/tests/compiler/dart2js/cpa_inference_test.dart
+++ b/tests/compiler/dart2js/cpa_inference_test.dart
@@ -144,10 +144,8 @@ class AnalysisResult {
}
/** Checks that the inferred type for [selector] is [mask]. */
- void checkSelectorHasType(Selector selector,
- TypeMask mask,
- TypeMask expectedMask) {
- Expect.equals(expectedMask, inferrer.getTypeOfSelector(selector, mask));
+ void checkSelectorHasType(Selector selector, TypeMask mask) {
+ Expect.equals(mask, inferrer.getTypeOfSelector(selector));
}
}
@@ -1650,29 +1648,24 @@ testSelectors() {
result.checkSelectorHasType(
foo,
- null,
new TypeMask.unionOf([a, b, c]
.map((cls) => new TypeMask.nonNullExact(cls, world)),
result.compiler.world));
result.checkSelectorHasType(
- foo,
- new TypeMask.subclass(x, world),
+ new TypedSelector.subclass(x, foo, world),
new TypeMask.nonNullExact(b, world));
result.checkSelectorHasType(
- foo,
- new TypeMask.subclass(y, world),
+ new TypedSelector.subclass(y, foo, world),
new TypeMask.nonNullExact(c, world));
result.checkSelectorHasType(
- foo,
- new TypeMask.subclass(z, world),
+ new TypedSelector.subclass(z, foo, world),
new TypeMask.nonNullExact(a, world));
result.checkSelectorHasType(
- foo,
- new TypeMask.subclass(xy, world),
+ new TypedSelector.subclass(xy, foo, world),
new TypeMask.unionOf([b, c].map((cls) =>
new TypeMask.nonNullExact(cls, world)), world));
- result.checkSelectorHasType(new Selector.call("bar", null, 0), null, null);
+ result.checkSelectorHasType(new Selector.call("bar", null, 0), null);
});
}
@@ -1685,7 +1678,6 @@ testEqualsNullSelector() {
return analyze(source).then((result) {
ClassElement bool = result.compiler.backend.boolImplementation;
result.checkSelectorHasType(new Selector.binaryOperator('=='),
- null,
new TypeMask.nonNullExact(bool,
result.compiler.world));
});
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | tests/compiler/dart2js/gvn_dynamic_field_get_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698