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

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

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 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
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 // Test that computation of callers of an element works when two 5 // Test that computation of callers of an element works when two
6 // elements of the same name are being invoked in the same method. 6 // elements of the same name are being invoked in the same method.
7 7
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import 'package:compiler/src/inferrer/type_graph_inferrer.dart'; 10 import 'package:compiler/src/inferrer/type_graph_inferrer.dart';
(...skipping 21 matching lines...) Expand all
32 MyInferrer(compiler, commonMasks) : super(compiler, commonMasks); 32 MyInferrer(compiler, commonMasks) : super(compiler, commonMasks);
33 clear() {} 33 clear() {}
34 } 34 }
35 35
36 void main() { 36 void main() {
37 Uri uri = new Uri(scheme: 'source'); 37 Uri uri = new Uri(scheme: 'source');
38 var compiler = compilerFor(TEST, uri); 38 var compiler = compilerFor(TEST, uri);
39 var inferrer = new MyInferrer(compiler, compiler.commonMasks); 39 var inferrer = new MyInferrer(compiler, compiler.commonMasks);
40 compiler.globalInference.typesInferrer = inferrer; 40 compiler.globalInference.typesInferrer = inferrer;
41 asyncTest(() => compiler.run(uri).then((_) { 41 asyncTest(() => compiler.run(uri).then((_) {
42 var mainElement = findElement(compiler, 'main'); 42 var mainElement = findElement(compiler, 'main');
43 var classA = findElement(compiler, 'A'); 43 var classA = findElement(compiler, 'A');
44 var fieldA = classA.lookupLocalMember('field'); 44 var fieldA = classA.lookupLocalMember('field');
45 var classB = findElement(compiler, 'B'); 45 var classB = findElement(compiler, 'B');
46 var fieldB = classB.lookupLocalMember('field'); 46 var fieldB = classB.lookupLocalMember('field');
47 47
48 Expect.isTrue(inferrer.getCallersOf(fieldA).contains(mainElement)); 48 Expect.isTrue(inferrer.getCallersOf(fieldA).contains(mainElement));
49 Expect.isTrue(inferrer.getCallersOf(fieldB).contains(mainElement)); 49 Expect.isTrue(inferrer.getCallersOf(fieldB).contains(mainElement));
50 })); 50 }));
51 } 51 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_and_or_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_closure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698