| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Checks that dart2js produces the expected static type warnings and | 5 // Checks that dart2js produces the expected static type warnings and |
| 6 // compile-time errors for the provided multitests. | 6 // compile-time errors for the provided multitests. |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 | 9 |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| 11 import 'package:async_helper/async_helper.dart'; | 11 import 'package:async_helper/async_helper.dart'; |
| 12 | 12 |
| 13 import 'memory_compiler.dart'; | 13 import 'memory_compiler.dart'; |
| 14 | 14 |
| 15 import '../../../tools/testing/dart/multitest.dart' | 15 import '../../../tools/testing/dart/multitest.dart' |
| 16 show ExtractTestsFromMultitest; | 16 show ExtractTestsFromMultitest; |
| 17 import '../../../tools/testing/dart/utils.dart' | 17 import '../../../tools/testing/dart/path.dart' |
| 18 show Path; | 18 show Path; |
| 19 | 19 |
| 20 void check(List<String> testFiles, | 20 void check(List<String> testFiles, |
| 21 {List<String> arguments: const <String>[], | 21 {List<String> arguments: const <String>[], |
| 22 List<String> options: const <String>[]}) { | 22 List<String> options: const <String>[]}) { |
| 23 bool outcomeMismatch = false; | 23 bool outcomeMismatch = false; |
| 24 bool verbose = arguments.contains('-v'); | 24 bool verbose = arguments.contains('-v'); |
| 25 var cachedCompiler; | 25 var cachedCompiler; |
| 26 asyncTest(() => Future.forEach(testFiles, (String testFile) { | 26 asyncTest(() => Future.forEach(testFiles, (String testFile) { |
| 27 Map<String, String> testSources = {}; | 27 Map<String, String> testSources = {}; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 outcomeMismatch = true; | 62 outcomeMismatch = true; |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 cachedCompiler = compiler; | 65 cachedCompiler = compiler; |
| 66 }); | 66 }); |
| 67 }); | 67 }); |
| 68 }).then((_) { | 68 }).then((_) { |
| 69 Expect.isFalse(outcomeMismatch, 'Outcome mismatch'); | 69 Expect.isFalse(outcomeMismatch, 'Outcome mismatch'); |
| 70 })); | 70 })); |
| 71 } | 71 } |
| OLD | NEW |