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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_checked_arguments1_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_checked_arguments1_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_checked_arguments1_test.dart b/dart/tests/compiler/dart2js_foreign/native_checked_arguments1_test.dart
index 231f672f5ae7b08a87d7f1253b302da96b49ecd4..37103f5905c734e0225222e592ff80e4184c82eb 100644
--- a/dart/tests/compiler/dart2js_foreign/native_checked_arguments1_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_checked_arguments1_test.dart
@@ -4,20 +4,22 @@
// Test that type checks occur on native methods.
-class A native "*A" {
- int foo(int x) native;
- int cmp(A other) native;
+@native("*A")
+class A {
+ @native int foo(int x);
+ @native int cmp(A other);
}
-class B native "*B" {
- String foo(String x) native;
- int cmp(B other) native;
+@native("*B")
+class B {
+ @native String foo(String x);
+ @native int cmp(B other);
}
-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 (x) { return x + 1; };
A.prototype.cmp = function (x) { return 0; };
@@ -28,7 +30,8 @@ B.prototype.cmp = function (x) { return 1; };
makeA = function(){return new A;};
makeB = function(){return new B;};
-""";
+""")
+void setup();
expectThrows(action()) {
bool threw = false;

Powered by Google App Engine
This is Rietveld 408576698