| OLD | NEW |
| 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_compilation_test; | 5 library dart2js.serialization_compilation_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/compiler.dart'; | 9 import 'package:compiler/src/commandline_options.dart'; |
| 10 import 'package:compiler/src/filenames.dart'; | 10 import 'package:compiler/src/filenames.dart'; |
| 11 import '../memory_compiler.dart'; | 11 import '../memory_compiler.dart'; |
| 12 import 'helper.dart'; | 12 import 'helper.dart'; |
| 13 import 'test_data.dart'; | 13 import 'test_data.dart'; |
| 14 import '../output_collector.dart'; | 14 import '../output_collector.dart'; |
| 15 | 15 |
| 16 main(List<String> args) { | 16 main(List<String> args) { |
| 17 asyncTest(() async { | 17 asyncTest(() async { |
| 18 Arguments arguments = new Arguments.from(args); | 18 Arguments arguments = new Arguments.from(args); |
| 19 SerializedData serializedData = | 19 SerializedData serializedData = |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 List<Uri> resolutionInputs, | 37 List<Uri> resolutionInputs, |
| 38 int index, | 38 int index, |
| 39 Test test, | 39 Test test, |
| 40 bool verbose: false}) async { | 40 bool verbose: false}) async { |
| 41 String testDescription = test != null ? test.name : '${entryPoint}'; | 41 String testDescription = test != null ? test.name : '${entryPoint}'; |
| 42 String id = index != null ? '$index: ' : ''; | 42 String id = index != null ? '$index: ' : ''; |
| 43 print('------------------------------------------------------------------'); | 43 print('------------------------------------------------------------------'); |
| 44 print('compile ${id}${testDescription}'); | 44 print('compile ${id}${testDescription}'); |
| 45 print('------------------------------------------------------------------'); | 45 print('------------------------------------------------------------------'); |
| 46 OutputCollector outputCollector = new OutputCollector(); | 46 OutputCollector outputCollector = new OutputCollector(); |
| 47 List<String> options = []; |
| 48 if (test.checkedMode) { |
| 49 options.add(Flags.enableCheckedMode); |
| 50 } |
| 47 await runCompiler( | 51 await runCompiler( |
| 48 entryPoint: entryPoint, | 52 entryPoint: entryPoint, |
| 49 memorySourceFiles: sourceFiles, | 53 memorySourceFiles: sourceFiles, |
| 50 resolutionInputs: resolutionInputs, | 54 resolutionInputs: resolutionInputs, |
| 51 options: [], | 55 options: options, |
| 52 outputProvider: outputCollector); | 56 outputProvider: outputCollector); |
| 53 if (verbose) { | 57 if (verbose) { |
| 54 print(outputCollector.getOutput('', 'js')); | 58 print(outputCollector.getOutput('', 'js')); |
| 55 } | 59 } |
| 56 } | 60 } |
| 57 | 61 |
| OLD | NEW |