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

Side by Side Diff: tests/compiler/dart2js/simple_inferrer_closure_test.dart

Issue 552253002: Adapt TypeMask tests to new TypeMask interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 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 'type_mask_test_helper.dart'; 8 import 'type_mask_test_helper.dart';
9 9
10 const String TEST = """ 10 const String TEST = """
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 checkReturn('returnDyn3', compiler.typesTask.dynamicType.nonNullable()); 139 checkReturn('returnDyn3', compiler.typesTask.dynamicType.nonNullable());
140 checkReturn('returnNum1', compiler.typesTask.numType); 140 checkReturn('returnNum1', compiler.typesTask.numType);
141 141
142 checkReturnInClass(String className, String methodName, type) { 142 checkReturnInClass(String className, String methodName, type) {
143 var cls = findElement(compiler, className); 143 var cls = findElement(compiler, className);
144 var element = cls.lookupLocalMember(methodName); 144 var element = cls.lookupLocalMember(methodName);
145 Expect.equals(type, 145 Expect.equals(type,
146 simplify(typesInferrer.getReturnTypeOfElement(element), compiler)); 146 simplify(typesInferrer.getReturnTypeOfElement(element), compiler));
147 } 147 }
148 var cls = findElement(compiler, 'A'); 148 var cls = findElement(compiler, 'A');
149 checkReturnInClass('A', 'foo', new TypeMask.nonNullExact(cls)); 149 checkReturnInClass('A', 'foo', new TypeMask.nonNullExact(cls,
150 compiler.world));
150 })); 151 }));
151 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698