e2b377c73f
Change-Id: Id45adc172695b71716d5ef7019d688641ca828c4 Reviewed-on: https://dart-review.googlesource.com/31483 Reviewed-by: Sigmund Cherem <sigmund@google.com>
23 lines
849 B
Dart
23 lines
849 B
Dart
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import "package:expect/expect.dart";
|
|
import "package:async_helper/async_helper.dart";
|
|
import '../compiler_helper.dart';
|
|
|
|
main() {
|
|
runTest({bool useKernel}) async {
|
|
String code = await compileAll(r'''main() { return "foo" + "bar"; }''',
|
|
compileMode: useKernel ? CompileMode.kernel : CompileMode.memory);
|
|
Expect.isTrue(!code.contains(r'$add'));
|
|
}
|
|
|
|
asyncTest(() async {
|
|
print('--test from ast---------------------------------------------------');
|
|
await runTest(useKernel: false);
|
|
print('--test from kernel------------------------------------------------');
|
|
await runTest(useKernel: true);
|
|
});
|
|
}
|