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

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

Issue 2625713002: Rename Enqueuer.universe to worldBuilder. (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Test that parameters keep their names in the output. 4 // Test that parameters keep their names in the output.
5 5
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'memory_compiler.dart'; 9 import 'memory_compiler.dart';
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 typedef void JsonTaking(Map<String, dynamic> json); 97 typedef void JsonTaking(Map<String, dynamic> json);
98 98
99 jsonTest(String program, JsonTaking testFn) async { 99 jsonTest(String program, JsonTaking testFn) async {
100 var result = await runCompiler( 100 var result = await runCompiler(
101 memorySourceFiles: {'main.dart': program}, options: ['--dump-info']); 101 memorySourceFiles: {'main.dart': program}, options: ['--dump-info']);
102 var compiler = result.compiler; 102 var compiler = result.compiler;
103 Expect.isFalse(compiler.compilationFailed); 103 Expect.isFalse(compiler.compilationFailed);
104 var dumpTask = compiler.dumpInfoTask; 104 var dumpTask = compiler.dumpInfoTask;
105 105
106 StringBuffer sb = new StringBuffer(); 106 StringBuffer sb = new StringBuffer();
107 dumpTask.dumpInfoJson(sb, compiler.resolverWorld.closedWorldForTesting); 107 dumpTask.dumpInfoJson(
108 sb, compiler.resolutionWorldBuilder.closedWorldForTesting);
108 String json = sb.toString(); 109 String json = sb.toString();
109 Map<String, dynamic> map = JSON.decode(json); 110 Map<String, dynamic> map = JSON.decode(json);
110 111
111 testFn(map); 112 testFn(map);
112 } 113 }
113 114
114 main() { 115 main() {
115 asyncTest(runTests); 116 asyncTest(runTests);
116 } 117 }
117 118
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 Expect.isTrue(main_ != null); 173 Expect.isTrue(main_ != null);
173 Expect.isTrue(fn1 != null); 174 Expect.isTrue(fn1 != null);
174 Expect.isTrue(fn2 != null); 175 Expect.isTrue(fn2 != null);
175 Expect.isTrue(deps.containsKey(main_['id'])); 176 Expect.isTrue(deps.containsKey(main_['id']));
176 Expect.isTrue(deps.containsKey(fn1['id'])); 177 Expect.isTrue(deps.containsKey(fn1['id']));
177 Expect.isTrue(deps.containsKey(fn2['id'])); 178 Expect.isTrue(deps.containsKey(fn2['id']));
178 Expect.isTrue(deps[main_['id']].any((dep) => dep['id'] == fn1['id'])); 179 Expect.isTrue(deps[main_['id']].any((dep) => dep['id'] == fn1['id']));
179 Expect.isTrue(deps[fn1['id']].any((dep) => dep['id'] == fn2['id'])); 180 Expect.isTrue(deps[fn1['id']].any((dep) => dep['id'] == fn2['id']));
180 }); 181 });
181 } 182 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/concrete_type_inference_test.dart ('k') | tests/compiler/dart2js/expect_annotations_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698