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

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

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 | « tests/corelib/queue_test.dart ('k') | tests/html/hidden_dom_1_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) 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 class FixedHashCode { 5 class FixedHashCode {
6 final int _hashCode; 6 final int _hashCode;
7 const FixedHashCode(this._hashCode); 7 const FixedHashCode(this._hashCode);
8 int get hashCode { return _hashCode; } 8 int get hashCode { return _hashCode; }
9 } 9 }
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 static void testDifferentHashCodes() { 131 static void testDifferentHashCodes() {
132 for (int i = -20; i < 20; i++) { 132 for (int i = -20; i < 20; i++) {
133 Set set = new Set(); 133 Set set = new Set();
134 var element = new FixedHashCode(i); 134 var element = new FixedHashCode(i);
135 set.add(element); 135 set.add(element);
136 Expect.equals(1, set.length); 136 Expect.equals(1, set.length);
137 bool foundIt = false; 137 bool foundIt = false;
138 for (var x in set) { 138 for (var x in set) {
139 foundIt = true; 139 foundIt = true;
140 Expect.equals(true, x === element); 140 Expect.equals(true, identical(x, element));
141 } 141 }
142 Expect.equals(true, foundIt); 142 Expect.equals(true, foundIt);
143 } 143 }
144 } 144 }
145 } 145 }
146 146
147 main() { 147 main() {
148 SetIteratorTest.testMain(); 148 SetIteratorTest.testMain();
149 } 149 }
OLDNEW
« no previous file with comments | « tests/corelib/queue_test.dart ('k') | tests/html/hidden_dom_1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698