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

Unified Diff: tests/corelib/integer_to_radix_string_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/corelib/integer_to_radix_string_test.dart
diff --git a/tests/corelib/integer_to_radix_string_test.dart b/tests/corelib/integer_to_radix_string_test.dart
index 80d30ccbb9e91364e69797213dd29fae92dae8e0..3b2fac8da5d02774b75a86a9fa328180bddfd924 100644
--- a/tests/corelib/integer_to_radix_string_test.dart
+++ b/tests/corelib/integer_to_radix_string_test.dart
@@ -7,17 +7,51 @@ import "package:expect/expect.dart";
main() {
// Test that we accept radix 2 to 36 and that we use lower-case
// letters.
- var expected = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
- 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
- 'u', 'v', 'w', 'x', 'y', 'z'];
+ var expected = [
+ '0',
+ '1',
+ '2',
+ '3',
+ '4',
+ '5',
+ '6',
+ '7',
+ '8',
+ '9',
+ 'a',
+ 'b',
+ 'c',
+ 'd',
+ 'e',
+ 'f',
+ 'g',
+ 'h',
+ 'i',
+ 'j',
+ 'k',
+ 'l',
+ 'm',
+ 'n',
+ 'o',
+ 'p',
+ 'q',
+ 'r',
+ 's',
+ 't',
+ 'u',
+ 'v',
+ 'w',
+ 'x',
+ 'y',
+ 'z'
+ ];
for (var radix = 2; radix <= 36; radix++) {
for (var i = 0; i < radix; i++) {
Expect.equals(expected[i], i.toRadixString(radix));
}
}
- var illegalRadices = [ -1, 0, 1, 37 ];
+ var illegalRadices = [-1, 0, 1, 37];
for (var radix in illegalRadices) {
try {
42.toRadixString(radix);
@@ -32,7 +66,7 @@ main() {
0x80000000,
0x100000000,
0x10000000000000,
- 0x10000000000001, // 53 significant bits.
+ 0x10000000000001, // 53 significant bits.
0x20000000000000,
0x20000000000002,
0x1000000000000000,
@@ -54,8 +88,8 @@ main() {
for (int radix = 2; radix <= 36; radix++) {
String digits = bignum.toRadixString(radix);
int result = int.parse(digits, radix: radix);
- Expect.equals(bignum, result,
- "${bignum.toRadixString(16)} -> $digits/$radix");
+ Expect.equals(
+ bignum, result, "${bignum.toRadixString(16)} -> $digits/$radix");
}
}
}

Powered by Google App Engine
This is Rietveld 408576698