| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import 'dart:async'; | |
| 6 import 'package:async_helper/async_helper.dart'; | |
| 7 import 'package:compiler/src/kernel/kernel_backend_strategy.dart'; | |
| 8 import '../kernel/compile_from_dill_test_helper.dart'; | |
| 9 import '../serialization/helper.dart'; | |
| 10 | |
| 11 main(List<String> args) { | |
| 12 useJsStrategyForTesting = true; | |
| 13 asyncTest(() async { | |
| 14 await mainInternal(args); | |
| 15 }); | |
| 16 } | |
| 17 | |
| 18 Future mainInternal(List<String> args, | |
| 19 {bool skipWarnings: false, | |
| 20 bool skipErrors: false, | |
| 21 List<String> options: const <String>[]}) async { | |
| 22 Arguments arguments = new Arguments.from(args); | |
| 23 List<Test> tests; | |
| 24 if (arguments.uri != null) { | |
| 25 tests = <Test>[new Test.fromUri(arguments.uri)]; | |
| 26 } else { | |
| 27 tests = TESTS; | |
| 28 } | |
| 29 for (Test test in tests) { | |
| 30 if (test.uri != null) { | |
| 31 print('--- running test uri ${test.uri} -------------------------------'); | |
| 32 } else { | |
| 33 print( | |
| 34 '--- running test code -------------------------------------------'); | |
| 35 print(test.sources.values.first); | |
| 36 print('----------------------------------------------------------------'); | |
| 37 } | |
| 38 await runTest(test.entryPoint, test.sources, | |
| 39 verbose: arguments.verbose, | |
| 40 skipWarnings: skipWarnings, | |
| 41 skipErrors: skipErrors, | |
| 42 options: options, | |
| 43 expectAstEquivalence: true, | |
| 44 expectIdenticalOutput: false); | |
| 45 } | |
| 46 } | |
| OLD | NEW |