Chromium Code Reviews| 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() { |