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

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

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 /** 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 10
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return rand.nextInt(max); 292 return rand.nextInt(max);
293 } 293 }
294 294
295 /** Returns a random boolean value. */ 295 /** Returns a random boolean value. */
296 bool randomBool() { 296 bool randomBool() {
297 return rand.nextBool(); 297 return rand.nextBool();
298 } 298 }
299 299
300 /** Returns the alphabetized characters in a string. */ 300 /** Returns the alphabetized characters in a string. */
301 String alphagram(String s) { 301 String alphagram(String s) {
302 List<int> chars = s.charCodes; 302 List<int> chars = s.codeUnits.toList();
floitsch 2013/02/19 14:03:06 Add comment to explain why "toList" (make it modif
Lasse Reichstein Nielsen 2013/02/20 06:38:23 Done.
Lasse Reichstein Nielsen 2013/02/20 06:38:23 Done.
303 chars.sort((int a, int b) => a - b); 303 chars.sort((int a, int b) => a - b);
304 return new String.fromCharCodes(chars); 304 return new String.fromCharCodes(chars);
305 } 305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698