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

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

Issue 165143004: Move TypeMask.simplify to a test helper. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 6 years, 10 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/simple_inferrer_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_test.dart b/tests/compiler/dart2js/simple_inferrer_test.dart
index b2dd57ff233f8e0c9c65ed4eceeaa8dad2ee66ab..10d4d66c96d5f4a7615f56db2ed154fc05851718 100644
--- a/tests/compiler/dart2js/simple_inferrer_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_test.dart
@@ -7,9 +7,11 @@ import "package:async_helper/async_helper.dart";
import
'../../../sdk/lib/_internal/compiler/implementation/types/types.dart'
show TypeMask;
+import 'type_mask_test_helper.dart';
import 'compiler_helper.dart';
import 'parser_helper.dart';
+import 'type_mask_test_helper.dart';
const String TEST = """
returnNum1(a) {
@@ -714,7 +716,7 @@ void main() {
var element = findElement(compiler, name);
Expect.equals(
type,
- typesInferrer.getReturnTypeOfElement(element).simplify(compiler),
+ simplify(typesInferrer.getReturnTypeOfElement(element), compiler),
name);
}
var interceptorType =
@@ -775,9 +777,11 @@ void main() {
checkReturn('returnTopLevelGetter', typesTask.uint31Type);
checkReturn('testDeadCode', typesTask.uint31Type);
checkReturn('testLabeledIf', typesTask.uint31Type.nullable());
- checkReturn('testSwitch1', typesTask.intType
- .union(typesTask.doubleType, compiler)
- .nullable().simplify(compiler));
+ checkReturn('testSwitch1', simplify(
+ typesTask.intType
+ .union(typesTask.doubleType, compiler)
+ .nullable(),
+ compiler));
checkReturn('testSwitch2', typesTask.uint31Type);
checkReturn('testSwitch3', interceptorType.nullable());
checkReturn('testSwitch4', typesTask.uint31Type);
@@ -800,7 +804,7 @@ void main() {
var cls = findElement(compiler, className);
var element = cls.lookupLocalMember(methodName);
Expect.equals(type,
- typesInferrer.getReturnTypeOfElement(element).simplify(compiler),
+ simplify(typesInferrer.getReturnTypeOfElement(element), compiler),
'$className:$methodName');
}

Powered by Google App Engine
This is Rietveld 408576698