Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(759)

Side by Side Diff: tests/compiler/dart2js_foreign/native_class_inheritance2_test.dart

Issue 10993059: Stop using the Hashable interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Another space removed. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 to see if resolving a hidden native class's method interferes with 5 // Test to see if resolving a hidden native class's method interferes with
6 // subsequent resolving the subclass's method. This might happen if the 6 // subsequent resolving the subclass's method. This might happen if the
7 // superclass caches the method in the prototype, so shadowing the dispatcher 7 // superclass caches the method in the prototype, so shadowing the dispatcher
8 // stored on Object.prototype. 8 // stored on Object.prototype.
9 9
10 @native("*A") 10 @native("*A")
11 class A { 11 class A {
12 @native foo([a=100]); 12 @native foo([a=100]);
13 } 13 }
14 14
15 @native("*B") 15 @native("*B")
16 class B extends A { 16 class B extends A {
17 } 17 }
18 18
19 @native("*C") 19 @native("*C")
20 class C extends B { 20 class C extends B {
21 @native foo([z=300]); 21 @native foo([z=300]);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 Expect.equals('C.foo(300)', d.foo()); 74 Expect.equals('C.foo(300)', d.foo());
75 // If the above line fails with C.foo(100) then the dispatch to fill in the 75 // If the above line fails with C.foo(100) then the dispatch to fill in the
76 // default got the wrong one, followed by a second dispatch that resolved to 76 // default got the wrong one, followed by a second dispatch that resolved to
77 // the correct native method. 77 // the correct native method.
78 78
79 Expect.equals('A.foo(1)', a.foo(1)); 79 Expect.equals('A.foo(1)', a.foo(1));
80 Expect.equals('A.foo(2)', b.foo(2)); 80 Expect.equals('A.foo(2)', b.foo(2));
81 Expect.equals('C.foo(3)', c.foo(3)); 81 Expect.equals('C.foo(3)', c.foo(3));
82 Expect.equals('C.foo(4)', d.foo(4)); 82 Expect.equals('C.foo(4)', d.foo(4));
83 } 83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698