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

Unified Diff: tests/compiler/dart2js/map_tracer_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/map_tracer_test.dart
diff --git a/tests/compiler/dart2js/map_tracer_test.dart b/tests/compiler/dart2js/map_tracer_test.dart
index 8dc4fcd606093ac4aefd14e3cb9e48d9249f0080..79eeebc1abef86abfa5054110e932e50b012d05c 100644
--- a/tests/compiler/dart2js/map_tracer_test.dart
+++ b/tests/compiler/dart2js/map_tracer_test.dart
@@ -10,6 +10,7 @@ import
import 'compiler_helper.dart';
import 'parser_helper.dart';
+import 'type_mask_test_helper.dart';
String generateTest(String mapAllocation) {
@@ -236,12 +237,12 @@ void doTest(String allocation, [String keyElement,
checkType(String name, keyType, valueType) {
var element = findElement(compiler, name);
MapTypeMask mask = typesInferrer.getTypeOfElement(element);
- Expect.equals(keyType, mask.keyType.simplify(compiler), name);
- Expect.equals(valueType, mask.valueType.simplify(compiler), name);
+ Expect.equals(keyType, simplify(mask.keyType, compiler), name);
+ Expect.equals(valueType, simplify(mask.valueType, compiler), name);
}
- K(TypeMask other) => keyType.union(other, compiler).simplify(compiler);
- V(TypeMask other) => valueType.union(other, compiler).simplify(compiler);
+ K(TypeMask other) => simplify(keyType.union(other, compiler), compiler);
+ V(TypeMask other) => simplify(valueType.union(other, compiler), compiler);
checkType('mapInField', K(aKeyType), V(typesTask.numType));
checkType('mapPassedToMethod', K(aKeyType), V(typesTask.numType));
« no previous file with comments | « tests/compiler/dart2js/list_tracer_test.dart ('k') | tests/compiler/dart2js/mirror_final_field_inferrer2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698