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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_closure_identity_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_closure_identity_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_closure_identity_test.dart b/dart/tests/compiler/dart2js_foreign/native_closure_identity_test.dart
index 26c7d4e6ebca908484a662a1f4fcd6dc0b68ff93..81ee170a0b7bf60c4fa3e3a0ff23fa738fac7bd5 100644
--- a/dart/tests/compiler/dart2js_foreign/native_closure_identity_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_closure_identity_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();
var staticClosure;
staticMethod() => 42;

Powered by Google App Engine
This is Rietveld 408576698