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

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

Issue 11867024: Move some core classes to collection library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with bug number. Created 7 years, 11 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 | « tests/corelib/collection_test.dart ('k') | tests/corelib/has_next_iterator_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) 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 /** 5 /**
6 * Tests for the toString methods on collections and maps. 6 * Tests for the toString methods on collections and maps.
7 */ 7 */
8 8
9 library collection_to_string; 9 library collection_to_string;
10
11 import 'dart:collection' show Queue, LinkedHashMap;
10 import 'dart:math' as Math; 12 import 'dart:math' as Math;
11 13
12 // TODO(jjb): seed random number generator when API allows it 14 // TODO(jjb): seed random number generator when API allows it
13 15
14 const int NUM_TESTS = 300; 16 const int NUM_TESTS = 300;
15 const int MAX_COLLECTION_SIZE = 7; 17 const int MAX_COLLECTION_SIZE = 7;
16 18
17 Math.Random rand; 19 Math.Random rand;
18 20
19 main() { 21 main() {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 bool randomBool() { 296 bool randomBool() {
295 return rand.nextBool(); 297 return rand.nextBool();
296 } 298 }
297 299
298 /** Returns the alphabetized characters in a string. */ 300 /** Returns the alphabetized characters in a string. */
299 String alphagram(String s) { 301 String alphagram(String s) {
300 List<int> chars = s.charCodes; 302 List<int> chars = s.charCodes;
301 chars.sort((int a, int b) => a - b); 303 chars.sort((int a, int b) => a - b);
302 return new String.fromCharCodes(chars); 304 return new String.fromCharCodes(chars);
303 } 305 }
OLDNEW
« no previous file with comments | « tests/corelib/collection_test.dart ('k') | tests/corelib/has_next_iterator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698