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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart

Issue 10823423: Change dart2js_foreign suite to use metadata. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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
Index: dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart b/dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
index c6ae9c72e2fb75a87ab70f54ef856de338bb1dee..e14e590dc96e76e34bf60d735ab49d974b0b913c 100644
--- a/dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_field_rename_2_test.dart
@@ -10,7 +10,8 @@ interface I {
int key;
}
-class A implements I native "*A" {
+@native("*A")
+class A implements I {
int key; // jsname is 'key'
int getKey() => key;
}
@@ -21,17 +22,18 @@ class B implements I {
int getKey() => key;
}
-class X native "*X" {
- int native_key_method() native 'key';
+@native("*X")
+class X {
+ @native('key') int native_key_method();
// This should cause B.key to be renamed, but not A.key.
- int key() native 'key';
+ @native('key') int key();
}
-A makeA() native;
-X makeX() native;
+@native A makeA();
+@native X makeX();
-void setup() native """
+@native("""
// This code is all inside 'setup' and so not accesible from the global scope.
function A(){ this.key = 111; }
A.prototype.getKey = function(){return this.key;};
@@ -41,7 +43,8 @@ X.prototype.key = function(){return 666;};
makeA = function(){return new A};
makeX = function(){return new X};
-""";
+""")
+void setup();
testDynamic() {
var things = [makeA(), new B(), makeX()];

Powered by Google App Engine
This is Rietveld 408576698