Index: tests/compiler/dart2js/kernel/helper.dart |
diff --git a/tests/compiler/dart2js/kernel/helper.dart b/tests/compiler/dart2js/kernel/helper.dart |
index 4e89025f6dc6df0ca875abe1ab602d772a9f74e2..1d83a10c8d66501886c3ec0270fed1cca88bf5e4 100644 |
--- a/tests/compiler/dart2js/kernel/helper.dart |
+++ b/tests/compiler/dart2js/kernel/helper.dart |
@@ -14,11 +14,13 @@ import 'package:test/test.dart'; |
import '../memory_compiler.dart'; |
Future<String> compile(String code, |
- {String entry: 'main', bool useKernel: true}) async { |
+ {String entry: 'main', |
+ bool useKernel: true, |
+ bool disableTypeInference: true}) async { |
List<String> options = <String>[ |
- Flags.disableTypeInference, |
Flags.disableInlining, |
]; |
+ if (disableTypeInference) options.add(Flags.disableTypeInference); |
if (useKernel) options.add(Flags.useKernel); |
if (entry != 'main' && !code.contains('main')) { |
@@ -33,8 +35,15 @@ Future<String> compile(String code, |
return backend.getGeneratedCode(element); |
} |
-Future check(String code, {String entry: 'main'}) async { |
- var original = await compile(code, entry: entry, useKernel: false); |
- var kernel = await compile(code, entry: entry, useKernel: true); |
+Future check(String code, |
+ {String entry: 'main', bool disableTypeInference: true}) async { |
+ var original = await compile(code, |
+ entry: entry, |
+ useKernel: false, |
+ disableTypeInference: disableTypeInference); |
+ var kernel = await compile(code, |
+ entry: entry, |
+ useKernel: true, |
+ disableTypeInference: disableTypeInference); |
expect(kernel, original); |
} |