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

Side by Side Diff: tests/compiler/dart2js/serialization/impact_test.dart

Issue 2879593004: Reorganize equivalence test helpers (Closed)
Patch Set: Created 3 years, 7 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library dart2js.serialization_impact_test; 5 library dart2js.serialization_impact_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:compiler/src/commandline_options.dart'; 9 import 'package:compiler/src/commandline_options.dart';
10 import 'package:compiler/src/compiler.dart'; 10 import 'package:compiler/src/compiler.dart';
11 import 'package:compiler/src/filenames.dart'; 11 import 'package:compiler/src/filenames.dart';
12 import '../memory_compiler.dart'; 12 import '../memory_compiler.dart';
13 import '../equivalence/check_functions.dart';
13 import 'helper.dart'; 14 import 'helper.dart';
14 import 'test_helper.dart';
15 15
16 main(List<String> args) { 16 main(List<String> args) {
17 Arguments arguments = new Arguments.from(args); 17 Arguments arguments = new Arguments.from(args);
18 asyncTest(() async { 18 asyncTest(() async {
19 SerializedData serializedData = 19 SerializedData serializedData =
20 await serializeDartCore(arguments: arguments); 20 await serializeDartCore(arguments: arguments);
21 if (arguments.filename != null) { 21 if (arguments.filename != null) {
22 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename)); 22 Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
23 await check(serializedData, entryPoint); 23 await check(serializedData, entryPoint);
24 } else { 24 } else {
(...skipping 14 matching lines...) Expand all
39 39
40 Compiler compilerDeserialized = compilerFor( 40 Compiler compilerDeserialized = compilerFor(
41 memorySourceFiles: serializedData.toMemorySourceFiles(sourceFiles), 41 memorySourceFiles: serializedData.toMemorySourceFiles(sourceFiles),
42 resolutionInputs: serializedData.toUris(), 42 resolutionInputs: serializedData.toUris(),
43 options: [Flags.analyzeAll]); 43 options: [Flags.analyzeAll]);
44 compilerDeserialized.resolution.retainCachesForTesting = true; 44 compilerDeserialized.resolution.retainCachesForTesting = true;
45 await compilerDeserialized.run(entryPoint); 45 await compilerDeserialized.run(entryPoint);
46 46
47 checkAllImpacts(compilerNormal, compilerDeserialized, verbose: verbose); 47 checkAllImpacts(compilerNormal, compilerDeserialized, verbose: verbose);
48 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698