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

Side by Side Diff: dart/tests/corelib/symbol_test.dart

Issue 14173005: Update dart:mirrors to use Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also use _symbol_dev.Symbol.getName in dart2js Created 7 years, 8 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
« no previous file with comments | « dart/sdk/lib/mirrors/mirrors.dart ('k') | dart/tests/lib/mirrors/mirrors_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Basic test of Symbol class. 5 // Basic test of Symbol class.
6 6
7 main() { 7 main() {
8 var x; 8 var x;
9 print(x = const Symbol('fisk')); 9 print(x = const Symbol('fisk'));
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 throw 'unrelated objects are equal'; 76 throw 'unrelated objects are equal';
77 } 77 }
78 78
79 x.hashCode as int; 79 x.hashCode as int;
80 80
81 new Symbol('fisk').hashCode as int; 81 new Symbol('fisk').hashCode as int;
82 82
83 if (new Symbol('fisk').hashCode != x.hashCode) { 83 if (new Symbol('fisk').hashCode != x.hashCode) {
84 throw "non-const Symbol's hashCode not equal to its const equivalent"; 84 throw "non-const Symbol's hashCode not equal to its const equivalent";
85 } 85 }
86
87 if (new Symbol('') != const Symbol('')) {
88 throw 'empty Symbol not equals to itself';
89 }
86 } 90 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/mirrors/mirrors.dart ('k') | dart/tests/lib/mirrors/mirrors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698