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

Side by Side Diff: tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart

Issue 2992383002: Support use of dill in TypeEnv tests (Closed)
Patch Set: Created 3 years, 4 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 // Helper to test compilation equivalence between source and .dill based 5 // Helper to test compilation equivalence between source and .dill based
6 // compilation. 6 // compilation.
7 library dart2js.kernel.compile_from_dill_test_helper; 7 library dart2js.kernel.compile_from_dill_test_helper;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 10
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 if (collector.warnings.isNotEmpty && skipWarnings) { 280 if (collector.warnings.isNotEmpty && skipWarnings) {
281 print('Skipping due to warnings.'); 281 print('Skipping due to warnings.');
282 return ResultKind.warnings; 282 return ResultKind.warnings;
283 } 283 }
284 Expect.isFalse(compiler1.compilationFailed); 284 Expect.isFalse(compiler1.compilationFailed);
285 ClosedWorld closedWorld1 = 285 ClosedWorld closedWorld1 =
286 compiler1.resolutionWorldBuilder.closedWorldForTesting; 286 compiler1.resolutionWorldBuilder.closedWorldForTesting;
287 287
288 OutputCollector collector2 = new OutputCollector(); 288 OutputCollector collector2 = new OutputCollector();
289 Compiler compiler2 = await compileWithDill( 289 Compiler compiler2 = await compileWithDill(
290 entryPoint, const {}, <String>[]..addAll(commonOptions)..addAll(options), 290 entryPoint: entryPoint,
291 printSteps: true, compilerOutput: collector2); 291 options: <String>[]..addAll(commonOptions)..addAll(options),
292 printSteps: true,
293 compilerOutput: collector2);
292 294
293 KernelFrontEndStrategy frontendStrategy = compiler2.frontendStrategy; 295 KernelFrontEndStrategy frontendStrategy = compiler2.frontendStrategy;
294 KernelToElementMap elementMap = frontendStrategy.elementMap; 296 KernelToElementMap elementMap = frontendStrategy.elementMap;
295 297
296 Expect.isFalse(compiler2.compilationFailed); 298 Expect.isFalse(compiler2.compilationFailed);
297 299
298 KernelEquivalence equivalence1 = new KernelEquivalence(elementMap); 300 KernelEquivalence equivalence1 = new KernelEquivalence(elementMap);
299 301
300 ClosedWorld closedWorld2 = 302 ClosedWorld closedWorld2 =
301 compiler2.resolutionWorldBuilder.closedWorldForTesting; 303 compiler2.resolutionWorldBuilder.closedWorldForTesting;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; 365 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType];
364 checkSets(map1.keys, map2.keys, 'output', equality); 366 checkSets(map1.keys, map2.keys, 'output', equality);
365 map1.forEach((String name, BufferedOutputSink output1) { 367 map1.forEach((String name, BufferedOutputSink output1) {
366 BufferedOutputSink output2 = map2[name]; 368 BufferedOutputSink output2 = map2[name];
367 Expect.stringEquals(output1.text, output2.text); 369 Expect.stringEquals(output1.text, output2.text);
368 }); 370 });
369 }); 371 });
370 } 372 }
371 return ResultKind.success; 373 return ResultKind.success;
372 } 374 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/kernel/closed_world_from_dill_test.dart ('k') | tests/compiler/dart2js/kernel/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698