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

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

Issue 2955353002: Split inference type-info accessors into members, parameters and local functions (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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
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 6
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import 'compiler_helper.dart'; 8 import 'compiler_helper.dart';
9 import 'package:compiler/src/types/types.dart'; 9 import 'package:compiler/src/types/types.dart';
10 import 'type_mask_test_helper.dart'; 10 import 'type_mask_test_helper.dart';
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 test5(); 158 test5();
159 test6(); 159 test6();
160 } 160 }
161 """; 161 """;
162 162
163 checkReturn(MockCompiler compiler, String name, type) { 163 checkReturn(MockCompiler compiler, String name, type) {
164 var typesInferrer = compiler.globalInference.typesInferrerInternal; 164 var typesInferrer = compiler.globalInference.typesInferrerInternal;
165 var element = findElement(compiler, name); 165 var element = findElement(compiler, name);
166 Expect.equals( 166 Expect.equals(
167 type, 167 type,
168 simplify(typesInferrer.getReturnTypeOfElement(element), 168 simplify(typesInferrer.getReturnTypeOfMember(element),
169 typesInferrer.closedWorld), 169 typesInferrer.closedWorld),
170 name); 170 name);
171 } 171 }
172 172
173 test1() async { 173 test1() async {
174 Uri uri = new Uri(scheme: 'source'); 174 Uri uri = new Uri(scheme: 'source');
175 var compiler = compilerFor(TEST1, uri); 175 var compiler = compilerFor(TEST1, uri);
176 await compiler.run(uri); 176 await compiler.run(uri);
177 var closedWorld = compiler.resolutionWorldBuilder.closedWorldForTesting; 177 var closedWorld = compiler.resolutionWorldBuilder.closedWorldForTesting;
178 checkReturn(compiler, 'test1', closedWorld.commonMasks.uint31Type); 178 checkReturn(compiler, 'test1', closedWorld.commonMasks.uint31Type);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 main() { 234 main() {
235 asyncTest(() async { 235 asyncTest(() async {
236 await test1(); 236 await test1();
237 await test2(); 237 await test2();
238 await test3(); 238 await test3();
239 await test4(); 239 await test4();
240 }); 240 });
241 } 241 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698