| 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 // Test for correct hidden native class when interface has same name. | 5 // Test for correct hidden native class when interface has same name. |
| 6 | 6 |
| 7 #library('main'); | 7 library main; |
| 8 #import('native_library_same_name_used_lib1.dart'); | 8 import 'native_library_same_name_used_lib1.dart'; |
| 9 | 9 |
| 10 @native(""" | 10 @native(""" |
| 11 // This code is all inside 'setup' and so not accesible from the global scope. | 11 // This code is all inside 'setup' and so not accesible from the global scope. |
| 12 function I(){} | 12 function I(){} |
| 13 I.prototype.read = function() { return this._x; }; | 13 I.prototype.read = function() { return this._x; }; |
| 14 I.prototype.write = function(x) { this._x = x; }; | 14 I.prototype.write = function(x) { this._x = x; }; |
| 15 makeI = function(){return new I}; | 15 makeI = function(){return new I}; |
| 16 """) | 16 """) |
| 17 void setup(); | 17 void setup(); |
| 18 | 18 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 Expect.isFalse(ob is I, 'ob is I'); | 36 Expect.isFalse(ob is I, 'ob is I'); |
| 37 Expect.isFalse(ob is ProxyI, 'ob is ProxyI'); | 37 Expect.isFalse(ob is ProxyI, 'ob is ProxyI'); |
| 38 | 38 |
| 39 Expect.isTrue(b1 is I, 'b1 is I'); | 39 Expect.isTrue(b1 is I, 'b1 is I'); |
| 40 Expect.isTrue(b1 is ProxyI, 'b1 is ProxyI'); | 40 Expect.isTrue(b1 is ProxyI, 'b1 is ProxyI'); |
| 41 | 41 |
| 42 Expect.isTrue(a1 is I, 'a1 is I'); | 42 Expect.isTrue(a1 is I, 'a1 is I'); |
| 43 Expect.isFalse(a1 is ProxyI, 'a1 is ProxyI'); | 43 Expect.isFalse(a1 is ProxyI, 'a1 is ProxyI'); |
| 44 } | 44 } |
| OLD | NEW |