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

Side by Side Diff: tests/compiler/dart2js_foreign/native_class_avoids_hidden_name_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 that hidden native class names are not used by generated code. 5 // Test that hidden native class names are not used by generated code.
6 6
7 @native("*B") 7 @native("*B")
8 class A { 8 class A {
9 get name => 'A'; 9 get name => 'A';
10 static A create() => makeA(); 10 static A create() => makeA();
11 } 11 }
12 12
13 @native("*C") 13 @native("*C")
14 class B { 14 class B {
15 get name => 'B'; 15 get name => 'B';
16 static B create() => makeB(); 16 static B create() => makeB();
17 } 17 }
18 18
19 class C { // Ordinary class with name clashing with native class. 19 class C { // Ordinary class with name clashing with native class.
20 get name => 'C'; 20 get name => 'C';
21 static C create() => new C(); 21 static C create() => new C();
22 } 22 }
23 23
24 @native makeA(); 24 @native makeA();
(...skipping 24 matching lines...) Expand all
49 49
50 var things = [A.create(), B.create(), C.create()]; 50 var things = [A.create(), B.create(), C.create()];
51 var a = things[inscrutable(0)]; 51 var a = things[inscrutable(0)];
52 var b = things[inscrutable(1)]; 52 var b = things[inscrutable(1)];
53 var c = things[inscrutable(2)]; 53 var c = things[inscrutable(2)];
54 54
55 Expect.equals('A', a.name); 55 Expect.equals('A', a.name);
56 Expect.equals('B', b.name); 56 Expect.equals('B', b.name);
57 Expect.equals('C', c.name); 57 Expect.equals('C', c.name);
58 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698