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

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

Issue 2997533002: Migrate test block 10 to Dart 2.0. (Closed)
Patch Set: Fix merge error Created 3 years, 4 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 main() { 7 main() {
8 // Test that we accept radix 2 to 36 and that we use lower-case 8 // Test that we accept radix 2 to 36 and that we use lower-case
9 // letters. 9 // letters.
10 var expected = [ 10 var expected = [
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ]; 86 ];
87 for (var bignum in bignums) { 87 for (var bignum in bignums) {
88 for (int radix = 2; radix <= 36; radix++) { 88 for (int radix = 2; radix <= 36; radix++) {
89 String digits = bignum.toRadixString(radix); 89 String digits = bignum.toRadixString(radix);
90 int result = int.parse(digits, radix: radix); 90 int result = int.parse(digits, radix: radix);
91 Expect.equals( 91 Expect.equals(
92 bignum, result, "${bignum.toRadixString(16)} -> $digits/$radix"); 92 bignum, result, "${bignum.toRadixString(16)} -> $digits/$radix");
93 } 93 }
94 } 94 }
95 } 95 }
OLDNEW
« no previous file with comments | « tests/corelib_2/int_truncate_to_double_test.dart ('k') | tests/corelib_2/integer_to_string_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698