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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_checked_fields_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_fields_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_checked_fields_test.dart b/dart/tests/compiler/dart2js_foreign/native_checked_fields_test.dart
index df3421a0359513095fa3337765d4452905c00300..1d72f106c42e5f05b5a0b22b9ae854d0a25f7456 100644
--- a/dart/tests/compiler/dart2js_foreign/native_checked_fields_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_checked_fields_test.dart
@@ -4,25 +4,28 @@
// Test that type checks occur on assignment to fields of native methods.
-class A native "*A" {
+@native("*A")
+class A {
int foo;
}
-class B native "*B" {
+@native("*B")
+class B {
String foo;
}
-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() {}
function B() {}
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