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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_method_rename3_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_rename3_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_method_rename3_test.dart b/dart/tests/compiler/dart2js_foreign/native_method_rename3_test.dart
index 02b4160473e330ef7ae7af2f32fb6fa11d769f35..b576a7f0e02e8eddc3db801faad9580ceb848441 100644
--- a/dart/tests/compiler/dart2js_foreign/native_method_rename3_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_method_rename3_test.dart
@@ -5,12 +5,16 @@
// Test the feature where the native string declares the native method's name.
// #3. The name does not get
-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();
int fooA() => 333;
}
@@ -19,11 +23,11 @@ class Decoy {
int fooB() => 999;
}
-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__) {
@@ -43,7 +47,8 @@ B.prototype.fooB = function(){return 200;};
makeA = function(){return new A};
makeB = function(){return new B};
-""";
+""")
+void setup();
testDynamic() {
var things = [makeA(), makeB(), new Decoy()];

Powered by Google App Engine
This is Rietveld 408576698