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

Side by Side Diff: tests/compiler/dart2js_foreign/native_method_with_keyword_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) 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 // Make sure we can have a native with a name that is a JavaScript keyword. 5 // Make sure we can have a native with a name that is a JavaScript keyword.
6 6
7 @native("*A") 7 @native("*A")
8 class A { 8 class A {
9 @native int delete(); 9 @native int delete();
10 } 10 }
11 11
12 @native A makeA() { return new A(); } 12 @native A makeA() { return new A(); }
13 13
14 @native(""" 14 @native("""
15 function A() {} 15 function A() {}
16 A.prototype.delete = function() { return 87; }; 16 A.prototype.delete = function() { return 87; };
17 17
18 makeA = function(){return new A;}; 18 makeA = function(){return new A;};
19 """) 19 """)
20 void setup(); 20 void setup();
21 21
22 22
23 main() { 23 main() {
24 setup(); 24 setup();
25 25
26 var a = makeA(); 26 var a = makeA();
27 Expect.equals(87, a.delete()); 27 Expect.equals(87, a.delete());
28 A aa = a; 28 A aa = a;
29 Expect.equals(87, aa.delete()); 29 Expect.equals(87, aa.delete());
30 } 30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698