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

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

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests 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 // 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:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 import "package:async_helper/async_helper.dart"; 9 import "package:async_helper/async_helper.dart";
10 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; 10 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart';
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 void main() { 38 void main() {
39 Uri uri = new Uri(scheme: 'source'); 39 Uri uri = new Uri(scheme: 'source');
40 var compiler = compilerFor(TEST, uri); 40 var compiler = compilerFor(TEST, uri);
41 var inferrer = new MyInferrer(compiler); 41 var inferrer = new MyInferrer(compiler);
42 compiler.typesTask.typesInferrer = inferrer; 42 compiler.typesTask.typesInferrer = inferrer;
43 asyncTest(() => compiler.runCompiler(uri).then((_) { 43 asyncTest(() => compiler.runCompiler(uri).then((_) {
44 var mainElement = findElement(compiler, 'main'); 44 var mainElement = findElement(compiler, 'main');
45 var classA = findElement(compiler, 'A'); 45 var classA = findElement(compiler, 'A');
46 var fieldA = classA.lookupLocalMember(buildSourceString('field')); 46 var fieldA = classA.lookupLocalMember('field');
47 var classB = findElement(compiler, 'B'); 47 var classB = findElement(compiler, 'B');
48 var fieldB = classB.lookupLocalMember(buildSourceString('field'));; 48 var fieldB = classB.lookupLocalMember('field');;
kasperl 2013/10/18 06:44:57 ;; -> ;
lukas 2013/10/18 08:39:46 Done.
49 49
50 Expect.isTrue(inferrer.getCallersOf(fieldA).contains(mainElement)); 50 Expect.isTrue(inferrer.getCallersOf(fieldA).contains(mainElement));
51 Expect.isTrue(inferrer.getCallersOf(fieldB).contains(mainElement)); 51 Expect.isTrue(inferrer.getCallersOf(fieldB).contains(mainElement));
52 })); 52 }));
53 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698