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

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

Issue 24952003: Change TypeMask.base to be a ClassElement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moar declaration. Created 7 years, 3 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 45b882a959d189ee245320cab8fad15d015753eb..7731977fc03121929b3882656ba624b1375c6713 100644
--- a/tests/compiler/dart2js/simple_inferrer_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_test.dart
@@ -692,7 +692,7 @@ void main() {
checkReturn('returnInt8', typesTask.intType);
checkReturn('returnEmpty1', const TypeMask.nonNullEmpty());
checkReturn('returnEmpty2', const TypeMask.nonNullEmpty());
- TypeMask intType = new TypeMask.nonNullSubtype(compiler.intClass.rawType);
+ TypeMask intType = new TypeMask.nonNullSubtype(compiler.intClass);
checkReturn('testIsCheck1', intType);
checkReturn('testIsCheck2', intType);
checkReturn('testIsCheck3', intType.nullable());
@@ -725,7 +725,7 @@ void main() {
checkReturn('testIf1', typesTask.intType.nullable());
checkReturn('testIf2', typesTask.intType.nullable());
checkReturn('returnAsString',
- new TypeMask.subtype(compiler.stringClass.computeType(compiler)));
+ new TypeMask.subtype(compiler.stringClass));
checkReturn('returnIntAsNum', typesTask.intType);
checkReturn('returnAsTypedef', typesTask.functionType.nullable());
checkReturn('returnTopLevelGetter', typesTask.intType);
@@ -780,14 +780,14 @@ void main() {
checkFactoryConstructor(String className, String factoryName) {
var cls = findElement(compiler, className);
var element = cls.localLookup(buildSourceString(factoryName));
- Expect.equals(new TypeMask.nonNullExact(cls.rawType),
+ Expect.equals(new TypeMask.nonNullExact(cls),
typesInferrer.getReturnTypeOfElement(element));
}
checkFactoryConstructor('A', '');
checkReturn('testCascade1', typesTask.growableListType);
checkReturn('testCascade2', new TypeMask.nonNullExact(
- findElement(compiler, 'CascadeHelper').rawType));
+ findElement(compiler, 'CascadeHelper')));
checkReturn('testSpecialization1', typesTask.numType);
checkReturn('testSpecialization2', typesTask.dynamicType);
checkReturn('testSpecialization3', typesTask.intType.nullable());
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_closure_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_try_catch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698