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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_null_closure_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_null_closure_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_null_closure_test.dart b/dart/tests/compiler/dart2js_foreign/native_null_closure_test.dart
index 8a368d21648da3cab3b2a356a0df92b10e3598f8..f916a1211fc3bcc04c002330783bee2e0a5a0828 100644
--- a/dart/tests/compiler/dart2js_foreign/native_null_closure_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_null_closure_test.dart
@@ -4,21 +4,23 @@
typedef void MyFunctionType();
-class A native "*A" {
- setClosure(MyFunctionType f) native;
- check(MyFunctionType f) native;
- invoke() native;
+@native("*A")
+class A {
+ @native setClosure(MyFunctionType f);
+ @native check(MyFunctionType f);
+ @native invoke();
}
-makeA() native { return new A(); }
+@native makeA() { return new A(); }
-void setup() native """
+@native("""
function A() {}
A.prototype.setClosure = function(f) { this.f = f; };
A.prototype.check = function(f) { return this.f === f; };
A.prototype.invoke = function() { return this.f(); };
makeA = function(){return new A;};
-""";
+""")
+void setup();
main() {

Powered by Google App Engine
This is Rietveld 408576698