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

Unified Diff: tests/compiler/dart2js/kernel/helper.dart

Issue 2380573004: kernel->ssa: implement assert statements (Closed)
Patch Set: remove todo after discussion Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/kernel/assert_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/helper.dart
diff --git a/tests/compiler/dart2js/kernel/helper.dart b/tests/compiler/dart2js/kernel/helper.dart
index 1d83a10c8d66501886c3ec0270fed1cca88bf5e4..d7d4b11f6ee1e10d4ad25ac2cd351b43027c5e81 100644
--- a/tests/compiler/dart2js/kernel/helper.dart
+++ b/tests/compiler/dart2js/kernel/helper.dart
@@ -16,12 +16,14 @@ import '../memory_compiler.dart';
Future<String> compile(String code,
{String entry: 'main',
bool useKernel: true,
- bool disableTypeInference: true}) async {
+ bool disableTypeInference: true,
+ List<String> extraOptions: const <String>[]}) async {
List<String> options = <String>[
Flags.disableInlining,
];
if (disableTypeInference) options.add(Flags.disableTypeInference);
if (useKernel) options.add(Flags.useKernel);
+ options.addAll(extraOptions);
if (entry != 'main' && !code.contains('main')) {
code = "$code\n\nmain() => $entry;";
@@ -36,14 +38,18 @@ Future<String> compile(String code,
}
Future check(String code,
- {String entry: 'main', bool disableTypeInference: true}) async {
+ {String entry: 'main',
+ bool disableTypeInference: true,
+ List<String> extraOptions: const <String>[]}) async {
var original = await compile(code,
entry: entry,
useKernel: false,
- disableTypeInference: disableTypeInference);
+ disableTypeInference: disableTypeInference,
+ extraOptions: extraOptions);
var kernel = await compile(code,
entry: entry,
useKernel: true,
- disableTypeInference: disableTypeInference);
+ disableTypeInference: disableTypeInference,
+ extraOptions: extraOptions);
expect(kernel, original);
}
« no previous file with comments | « tests/compiler/dart2js/kernel/assert_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698