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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_call_arity1_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
« no previous file with comments | « no previous file | dart/tests/compiler/dart2js_foreign/native_call_arity2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/compiler/dart2js_foreign/native_call_arity1_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_call_arity1_test.dart b/dart/tests/compiler/dart2js_foreign/native_call_arity1_test.dart
index 9908a874f71dc01831ce12bda088ba86b9ecd355..f239730e692eb19dddc63b0dfff6605dbbca0393 100644
--- a/dart/tests/compiler/dart2js_foreign/native_call_arity1_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_call_arity1_test.dart
@@ -10,21 +10,23 @@
// * Named arguments are passed in the correct position, so require preceding
// arguments to be passed.
-class A native "*A" {
- int foo(int x) native;
+@native("*A")
sra1 2012/08/21 00:56:14 @native_type_tag("*A") @nativeTypeTag("*A") The c
+class A {
+ @native int foo(int x);
}
-class B native "*B" {
- int foo([x, y, z]) native;
+@native("*B")
+class B {
+ @native int foo([x, y, z]);
}
// 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("""
sra1 2012/08/21 00:56:14 @native_body Although I would like to deprecate t
function A() {}
A.prototype.foo = function () { return arguments.length; };
@@ -33,7 +35,8 @@ B.prototype.foo = function () { return arguments.length; };
makeA = function(){return new A;};
makeB = function(){return new B;};
-""";
+""")
+void setup();
testDynamicContext() {
« no previous file with comments | « no previous file | dart/tests/compiler/dart2js_foreign/native_call_arity2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698