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

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

Issue 2977403002: Migrate test block 3 to Dart 2.0. (Closed)
Patch Set: Created 3 years, 5 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
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 return rand.nextBool(); 378 return rand.nextBool();
379 } 379 }
380 380
381 /** Returns the alphabetized characters in a string. */ 381 /** Returns the alphabetized characters in a string. */
382 String alphagram(String s) { 382 String alphagram(String s) {
383 // Calling [toList] to convert unmodifiable list to normal list. 383 // Calling [toList] to convert unmodifiable list to normal list.
384 List<int> chars = s.codeUnits.toList(); 384 List<int> chars = s.codeUnits.toList();
385 chars.sort((int a, int b) => a - b); 385 chars.sort((int a, int b) => a - b);
386 return new String.fromCharCodes(chars); 386 return new String.fromCharCodes(chars);
387 } 387 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698