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

Unified Diff: tests/compiler/dart2js_native/native_field_rename_1_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_1_frog_test.dart
diff --git a/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart b/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
index 8b2a1d64bc14409c93b5292af42f82960e841077..755da14dc9c3ecbef9a7b6e984f9a603bf64e55d 100644
--- a/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
@@ -7,9 +7,10 @@
// 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;
-class A native "A" {
+@Native("A")
+class A {
int key; // jsname is 'key'
int getKey() => key;
}
@@ -20,7 +21,8 @@ class B {
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