| 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 // 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 |
| 6 // dispatch table. | 6 // dispatch table. |
| 7 | 7 |
| 8 import "package:expect/expect.dart"; | |
| 9 import 'native_metadata.dart'; | 8 import 'native_metadata.dart'; |
| 10 | 9 |
| 11 @Native("*NativeA") | 10 @Native("*NativeA") |
| 12 class A { | 11 class A { |
| 13 @native foo(); | 12 @native foo(); |
| 14 } | 13 } |
| 15 | 14 |
| 16 @Native("*NativeB") | 15 @Native("*NativeB") |
| 17 class B extends A { | 16 class B extends A { |
| 18 } | 17 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 48 var a = makeA(); | 47 var a = makeA(); |
| 49 Expect.equals(42, a.foo()); | 48 Expect.equals(42, a.foo()); |
| 50 A aa = a; | 49 A aa = a; |
| 51 Expect.equals(42, aa.foo()); | 50 Expect.equals(42, aa.foo()); |
| 52 | 51 |
| 53 var b = makeB(); | 52 var b = makeB(); |
| 54 Expect.equals(42, b.foo()); | 53 Expect.equals(42, b.foo()); |
| 55 B bb = b; | 54 B bb = b; |
| 56 Expect.equals(42, bb.foo()); | 55 Expect.equals(42, bb.foo()); |
| 57 } | 56 } |
| OLD | NEW |