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

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

Issue 2679913006: Add KernelNativeBehaviorComputer (Closed)
Patch Set: Rebased Created 3 years, 10 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 | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.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/impact_test.dart
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index f8f10fecef81b235ac629ff966bbc3ce34dd0be6..b44c706ccb19fb2c36082e28666f0e113077b2c4 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -29,8 +29,10 @@ import '../memory_compiler.dart';
import '../serialization/test_helper.dart';
const Map<String, String> SOURCE = const <String, String>{
- 'main.dart': r'''
+ // Pretend this is a dart2js_native test to allow use of 'native' keyword.
+ 'sdk/tests/compiler/dart2js_native/main.dart': r'''
import 'dart:_foreign_helper';
+import 'dart:_js_helper';
import 'helper.dart';
import 'dart:html';
@@ -177,6 +179,7 @@ main() {
testInstanceGenericMethod();
testDynamicPrivateMethodInvoke();
testJSCall();
+ testNativeMethod();
}
testEmpty() {}
@@ -604,8 +607,10 @@ testInstanceGenericMethod() {
testDynamicPrivateMethodInvoke([o]) => o._privateMethod();
testJSCall() => JS('int|bool', '#', null);
+@JSName('foo')
+testNativeMethod() native;
''',
- 'helper.dart': '''
+ 'sdk/tests/compiler/dart2js_native/helper.dart': '''
class Class {
const Class.generative();
factory Class.fact() => null;
@@ -627,7 +632,8 @@ main(List<String> args) {
bool fullTest = args.contains('--full');
asyncTest(() async {
enableDebugMode();
- Uri entryPoint = Uri.parse('memory:main.dart');
+ Uri entryPoint =
+ Uri.parse('memory:sdk/tests/compiler/dart2js_native/main.dart');
Compiler compiler = compilerFor(
entryPoint: entryPoint,
memorySourceFiles: SOURCE,
@@ -637,7 +643,7 @@ main(List<String> args) {
Flags.enableAssertMessage
]);
compiler.resolution.retainCachesForTesting = true;
- await compiler.run(entryPoint);
+ Expect.isTrue(await compiler.run(entryPoint));
JavaScriptBackend backend = compiler.backend;
KernelElementAdapter kernelElementAdapter =
new KernelWorldBuilder(compiler.reporter, backend.kernelTask.program);
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698