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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_class_inheritance4_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_class_inheritance4_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_class_inheritance4_test.dart b/dart/tests/compiler/dart2js_foreign/native_class_inheritance4_test.dart
index b0d1f5b7c4b7ce0326b1f733bdfac42fb7b96131..585dcea655bbea78603785fd98ac10679820bd98 100644
--- a/dart/tests/compiler/dart2js_foreign/native_class_inheritance4_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_class_inheritance4_test.dart
@@ -6,7 +6,8 @@
// inheritance, the superclass method must not be reached by a call on the
// subclass.
-class A native "*A" {
+@native("*A")
+class A {
var _field;
int get X => _field;
@@ -15,7 +16,8 @@ class A native "*A" {
int method(int z) => _field + z;
}
-class B extends A native "*B" {
+@native("*B")
+class B extends A {
var _field2;
int get X => _field2;
@@ -24,10 +26,10 @@ class B extends A native "*B" {
int method(int z) => _field2 + z;
}
-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 inherits(child, parent) {
if (child.prototype.__proto__) {
child.prototype.__proto__ = parent.prototype;
@@ -44,7 +46,8 @@ function B(){}
inherits(B, A);
makeA = function(){return new A;};
makeB = function(){return new B;};
-""";
+""")
+void setup();
testBasicA_dynamic() {
setup(); // Fresh constructors.

Powered by Google App Engine
This is Rietveld 408576698