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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_call_arity3_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_call_arity3_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_call_arity3_test.dart b/dart/tests/compiler/dart2js_foreign/native_call_arity3_test.dart
index a37b2250dae7d1b641b829262609e29c8377ef74..8cf1ceb205546542ba14b447b1979f9c7e3bdea9 100644
--- a/dart/tests/compiler/dart2js_foreign/native_call_arity3_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_call_arity3_test.dart
@@ -6,21 +6,23 @@
// parameters set to null. These parameters should be treated as if they
// do not have a default value for the native methods.
-class A native "*A" {
- int foo(int x) native;
+@native("*A")
+class A {
+ @native int foo(int x);
}
-class B native "*B" {
- int foo([x = null, y, z = null]) native;
+@native("*B")
+class B {
+ @native int foo([x = null, y, z = null]);
}
// TODO(sra): Add a case where the parameters have default values. Wait until
// dart:dom_deprecated / dart:html need non-null default values.
-A makeA() native { return new A(); }
-B makeB() native { return new B(); }
+@native A makeA() { return new A(); }
+@native B makeB() { return new B(); }
-void setup() native """
+@native("""
function A() {}
A.prototype.foo = function () { return arguments.length; };
@@ -29,7 +31,8 @@ B.prototype.foo = function () { return arguments.length; };
makeA = function(){return new A;};
makeB = function(){return new B;};
-""";
+""")
+void setup();
testDynamicContext() {

Powered by Google App Engine
This is Rietveld 408576698