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

Unified Diff: dart/tests/compiler/dart2js_foreign/native_exceptions1_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_exceptions1_test.dart
diff --git a/dart/tests/compiler/dart2js_foreign/native_exceptions1_test.dart b/dart/tests/compiler/dart2js_foreign/native_exceptions1_test.dart
index d33624c67a3d5facba65e14cbd5336d9c849e521..da3c028c108d6918c9e2dfca280bae46651dbffb 100644
--- a/dart/tests/compiler/dart2js_foreign/native_exceptions1_test.dart
+++ b/dart/tests/compiler/dart2js_foreign/native_exceptions1_test.dart
@@ -15,15 +15,17 @@
// The exception type.
-class E native "*E" {
- E._used() native; // Bogus native constructor, called only from fake body.
+@native("*E")
+class E {
+ @native E._used(); // Bogus native constructor, called only from fake body.
final int code;
}
// Type with exception-throwing methods.
-class A native "*A" {
- op(int x) native {
+@native("*A")
+class A {
+ @native op(int x) {
// Fake body calls constructor to mark the exception class (E) as used.
throw new E._used();
}
@@ -35,15 +37,16 @@ class B {
op(String x) => 123;
}
-makeA() native;
+@native makeA();
-void setup1() native """
+@native("""
// Ensure we are not relying on global names 'A' and 'E'.
A = null;
E = null;
-""";
+""")
+void setup1();
-void setup2() native """
+@native("""
// This code is all inside 'setup2' and so not accesible from the global scope.
function E(x){ this.code = x; }
@@ -53,7 +56,8 @@ A.prototype.op = function (x) {
return x / 2;
};
makeA = function(){return new A};
-""";
+""")
+void setup2();
int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));

Powered by Google App Engine
This is Rietveld 408576698