OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 | |
7 // Test that we put native names and not Dart names into the dynamic | 5 // Test that we put native names and not Dart names into the dynamic |
8 // dispatch table. | 6 // dispatch table. |
9 | 7 |
10 class A native "*NativeA" { | 8 class A native "*NativeA" { |
11 foo() native; | 9 foo() native; |
12 } | 10 } |
13 | 11 |
14 class B extends A native "*NativeB" { | 12 class B extends A native "*NativeB" { |
15 } | 13 } |
16 | 14 |
(...skipping 27 matching lines...) Expand all Loading... |
44 var a = makeA(); | 42 var a = makeA(); |
45 Expect.equals(42, a.foo()); | 43 Expect.equals(42, a.foo()); |
46 A aa = a; | 44 A aa = a; |
47 Expect.equals(42, aa.foo()); | 45 Expect.equals(42, aa.foo()); |
48 | 46 |
49 var b = makeB(); | 47 var b = makeB(); |
50 Expect.equals(42, b.foo()); | 48 Expect.equals(42, b.foo()); |
51 B bb = b; | 49 B bb = b; |
52 Expect.equals(42, bb.foo()); | 50 Expect.equals(42, bb.foo()); |
53 } | 51 } |
OLD | NEW |