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

Side by Side Diff: tests/compiler/dart2js/simple_inferrer_closure_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, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 'compiler_helper.dart'; 7 import 'compiler_helper.dart';
8 import 'parser_helper.dart' show buildSourceString; 8 import 'parser_helper.dart' show buildSourceString;
9 9
10 const String TEST = """ 10 const String TEST = """
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 checkReturn('returnDyn3', compiler.typesTask.dynamicType.nonNullable()); 138 checkReturn('returnDyn3', compiler.typesTask.dynamicType.nonNullable());
139 checkReturn('returnNum1', compiler.typesTask.numType); 139 checkReturn('returnNum1', compiler.typesTask.numType);
140 140
141 checkReturnInClass(String className, String methodName, type) { 141 checkReturnInClass(String className, String methodName, type) {
142 var cls = findElement(compiler, className); 142 var cls = findElement(compiler, className);
143 var element = cls.lookupLocalMember(buildSourceString(methodName)); 143 var element = cls.lookupLocalMember(buildSourceString(methodName));
144 Expect.equals(type, 144 Expect.equals(type,
145 typesInferrer.getReturnTypeOfElement(element).simplify(compiler)); 145 typesInferrer.getReturnTypeOfElement(element).simplify(compiler));
146 } 146 }
147 var cls = findElement(compiler, 'A'); 147 var cls = findElement(compiler, 'A');
148 checkReturnInClass('A', 'foo', new TypeMask.nonNullExact(cls.rawType)); 148 checkReturnInClass('A', 'foo', new TypeMask.nonNullExact(cls));
149 })); 149 }));
150 } 150 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698