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

Unified Diff: tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart

Issue 383413003: Add @Native(...) annotation for native class names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 5 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: tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart b/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
index 2bd4481047e82eb94cd9efd47d74fe43502e2777..8a85ab381efacccd1f0bd23beddd5c2483c95f40 100644
--- a/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
@@ -7,13 +7,14 @@
// for the field must be based on the field's name, not the field's jsname.
import "package:expect/expect.dart";
-import 'dart:_js_helper' show JSName;
+import 'dart:_js_helper' show Native, JSName;
abstract class I {
int key;
}
-class A implements I native "A" {
+@Native("A")
+class A implements I {
int key; // jsname is 'key'
int getKey() => key;
}
@@ -24,7 +25,8 @@ class B implements I {
int getKey() => key;
}
-class X native "X" {
+@Native("X")
+class X {
@JSName('key')
int native_key_method() native;
// This should cause B.key to be renamed, but not A.key.

Powered by Google App Engine
This is Rietveld 408576698