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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_method_rename2_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_method_rename2_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_method_rename2_test.dart b/dart/tests/compiler/dart2js_foreign/native_method_rename2_test.dart
index b5cc3b1c966dda7d202849299cf1f3d10a4118c2..549a08ab4ed72b88c36d77efaa841921edc768fc 100644
--- a/dart/tests/compiler/dart2js_foreign/native_method_rename2_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_method_rename2_test.dart
@@ -4,18 +4,22 @@
// Test the feature where the native string declares the native method's name.
-class A native "*A" {
- int foo() native 'fooA';
+@native("*A")
+class A {
+ @native('fooA')
+ int foo();
}
-class B extends A native "*B" {
- int foo() native 'fooB';
+@native("*B")
+class B extends A {
+ @native('fooB')
+ int foo();
}
-makeA() native;
-makeB() native;
+@native makeA();
+@native makeB();
-void setup() native """
+@native("""
// This code is all inside 'setup' and so not accesible from the global scope.
function inherits(child, parent) {
if (child.prototype.__proto__) {
@@ -35,7 +39,8 @@ B.prototype.fooB = function(){return 200;};
makeA = function(){return new A};
makeB = function(){return new B};
-""";
+""")
+void setup();
testDynamic() {
var things = [makeA(), makeB()];

Powered by Google App Engine
This is Rietveld 408576698