OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
| 5 import "package:expect/expect.dart"; |
| 6 |
5 // Test that hidden native class names are not used by generated code. | 7 // Test that hidden native class names are not used by generated code. |
6 | 8 |
7 class A native "*B" { | 9 class A native "*B" { |
8 get name => 'A'; | 10 get name => 'A'; |
9 static A create() => makeA(); | 11 static A create() => makeA(); |
10 } | 12 } |
11 | 13 |
12 class B native "*C" { | 14 class B native "*C" { |
13 get name => 'B'; | 15 get name => 'B'; |
14 static B create() => makeB(); | 16 static B create() => makeB(); |
(...skipping 30 matching lines...) Expand all Loading... |
45 | 47 |
46 var things = [A.create(), B.create(), C.create()]; | 48 var things = [A.create(), B.create(), C.create()]; |
47 var a = things[inscrutable(0)]; | 49 var a = things[inscrutable(0)]; |
48 var b = things[inscrutable(1)]; | 50 var b = things[inscrutable(1)]; |
49 var c = things[inscrutable(2)]; | 51 var c = things[inscrutable(2)]; |
50 | 52 |
51 Expect.equals('A', a.name); | 53 Expect.equals('A', a.name); |
52 Expect.equals('B', b.name); | 54 Expect.equals('B', b.name); |
53 Expect.equals('C', c.name); | 55 Expect.equals('C', c.name); |
54 } | 56 } |
OLD | NEW |