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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_wrapping_function3_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_wrapping_function3_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_wrapping_function3_test.dart b/dart/tests/compiler/dart2js_foreign/native_wrapping_function3_test.dart
index d00d434afef36963aad1fceeb1dd4f20aac8ef4c..371ad2e05f0e45465d7b1590beb56ffc8e7185dc 100644
--- a/dart/tests/compiler/dart2js_foreign/native_wrapping_function3_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_wrapping_function3_test.dart
@@ -6,21 +6,23 @@ typedef void Callback0();
typedef void Callback1(arg1);
typedef void Callback2(arg1, arg2);
-class A native "*A" {
- foo1(Callback1 closure, [arg1 = 0]) native;
- foo2(Callback2 closure, [arg1 = 0, arg2 = 1]) native;
+@native("*A")
+class A {
+ @native foo1(Callback1 closure, [arg1 = 0]);
+ @native foo2(Callback2 closure, [arg1 = 0, arg2 = 1]);
}
-makeA() native;
+@native makeA();
-void setup() native """
+@native("""
function A() {}
A.prototype.foo1 = function(closure, arg1) { return closure(arg1); };
A.prototype.foo2 = function(closure, arg1, arg2) {
return closure(arg1, arg2);
};
makeA = function(){return new A;};
-""";
+""")
+void setup();
main() {

Powered by Google App Engine
This is Rietveld 408576698