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

Side by Side Diff: tests/compiler/dart2js_extra/hash_code_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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 import "package:expect/expect.dart";
6
7 // dart2js specific test to make sure hashCode on intercepted types behaves as 5 // dart2js specific test to make sure hashCode on intercepted types behaves as
8 // intended. 6 // intended.
9 7
10 8
11 class Hasher { 9 class Hasher {
12 confuse(x) => [1, 'x', true, null, x].last; 10 confuse(x) => [1, 'x', true, null, x].last;
13 hash(x) => confuse(x).hashCode; 11 hash(x) => confuse(x).hashCode;
14 } 12 }
15 13
16 // Hashing via [hash] should be forced to use the general interceptor, but the 14 // Hashing via [hash] should be forced to use the general interceptor, but the
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 Expect.equals(0x0DB819B, 'b'.hashCode); 72 Expect.equals(0x0DB819B, 'b'.hashCode);
75 Expect.equals(0xEBA5D59, 'c'.hashCode); 73 Expect.equals(0xEBA5D59, 'c'.hashCode);
76 } 74 }
77 75
78 main() { 76 main() {
79 bools(); 77 bools();
80 ints(); 78 ints();
81 lists(); 79 lists();
82 strings(); 80 strings();
83 } 81 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/getters_setters_test.dart ('k') | tests/compiler/dart2js_extra/if_in_loop.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698