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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_class_inheritance1_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_inheritance1_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_class_inheritance1_test.dart b/dart/tests/compiler/dart2js_foreign/native_class_inheritance1_test.dart
index 6cd5fdb005fdc8d4081c5cf330cabfa4746846f9..8d83356bb42d22229c3868c9993280a2747c81a7 100644
--- a/dart/tests/compiler/dart2js_foreign/native_class_inheritance1_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_class_inheritance1_test.dart
@@ -8,31 +8,35 @@
// stored on Object.prototype.
// Version 1: It might be possible to call foo directly.
-class A1 native "*A1" {
- foo() native;
+@native("*A1")
+class A1 {
+ @native foo();
}
-class B1 extends A1 native "*B1" {
- foo() native;
+@native("*B1")
+class B1 extends A1 {
+ @native foo();
}
-makeA1() native;
-makeB1() native;
+@native makeA1();
+@native makeB1();
// Version 2: foo needs some kind of trampoline.
-class A2 native "*A2" {
- foo([a=99]) native;
+@native("*A2")
+class A2 {
+ @native foo([a=99]);
}
-class B2 extends A2 native "*B2" {
- foo([z=1000]) native;
+@native("*B2")
+class B2 extends A2 {
+ @native foo([z=1000]);
}
-makeA2() native;
-makeB2() native;
+@native makeA2();
+@native makeB2();
-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__) {
@@ -61,7 +65,8 @@ B2.prototype.foo = function(z){return z + 20000;}
makeA2 = function(){return new A2};
makeB2 = function(){return new B2};
-""";
+""")
+void setup();
main() {

Powered by Google App Engine
This is Rietveld 408576698