| Index: tests/compiler/dart2js_native/static_methods_test.dart
|
| diff --git a/tests/compiler/dart2js_native/static_methods_test.dart b/tests/compiler/dart2js_native/static_methods_test.dart
|
| index e330682aaa6edfd322fab3b0ed2e67905525f5ff..f1cfd44a3670d2ba2c53eab581b9c461194a2d4e 100644
|
| --- a/tests/compiler/dart2js_native/static_methods_test.dart
|
| +++ b/tests/compiler/dart2js_native/static_methods_test.dart
|
| @@ -10,29 +10,30 @@
|
| import "package:expect/expect.dart";
|
| import 'dart:_js_helper' show Native, JSName, convertDartClosureToJS;
|
|
|
| -
|
| typedef int Callback(String s);
|
|
|
| -@Native("CC") // Tag can be different to class name.
|
| +@Native("CC") // Tag can be different to class name.
|
| class AA {
|
| // This name is not an identifier, so completely defines how to access method.
|
| @JSName('CC.foo')
|
| - static int foo(String s) native;
|
| + static int foo(String s) native ;
|
|
|
| // This name is not an identifier, so completely defines how to access method.
|
| @JSName('CC.bar')
|
| - static int bar(Callback c) native;
|
| - static int baz(Callback c) { return bar(c); }
|
| + static int bar(Callback c) native ;
|
| + static int baz(Callback c) {
|
| + return bar(c);
|
| + }
|
|
|
| // Compiler should automatically use the tag and the declared name, i.e. call
|
| // `CC.lepton`.
|
| - static int lepton(Callback c) native;
|
| + static int lepton(Callback c) native ;
|
| static int electron(c) => lepton(c);
|
|
|
| // Compiler should automatically use the tag and JSName, i.e. call
|
| // `CC.baryon`.
|
| @JSName('baryon')
|
| - static int _baryon(Callback c) native;
|
| + static int _baryon(Callback c) native ;
|
| static int proton(c) => _baryon(c);
|
| }
|
|
|
| @@ -66,5 +67,5 @@ main() {
|
|
|
| Expect.equals(12, AA._baryon((s) => s.length));
|
| Expect.equals(12, AA.proton((s) => s.length));
|
| - Expect.throws(() => AA.baryon((s) => s.length)); // Not defined on AA.
|
| + Expect.throws(() => AA.baryon((s) => s.length)); // Not defined on AA.
|
| }
|
|
|