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

Side by Side Diff: tests/corelib_strong/int_parse_radix_test.dart

Issue 2748003002: Revert "Remove U+180E from whitespace in js_runtime and tests" (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « tests/corelib_strong/double_parse_test.dart ('k') | tests/corelib_strong/num_parse_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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "dart:math" show pow; 6 import "dart:math" show pow;
7 7
8 void main() { 8 void main() {
9 bool checkedMode = false; 9 bool checkedMode = false;
10 assert((checkedMode = true)); 10 assert((checkedMode = true));
11 const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20" 11 const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20"
12 "\x85" /// 01: ok 12 "\x85" /// 01: ok
13 "\xa0"; 13 "\xa0";
14 const String whiteSpace = "$oneByteWhiteSpace\u1680" 14 const String whiteSpace = "$oneByteWhiteSpace\u1680\u180e"
15 "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a" 15 "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a"
16 "\u2028\u2029\u202f\u205f\u3000\ufeff"; 16 "\u2028\u2029\u202f\u205f\u3000\ufeff";
17 17
18 var digits = "0123456789abcdefghijklmnopqrstuvwxyz"; 18 var digits = "0123456789abcdefghijklmnopqrstuvwxyz";
19 var zeros = "0" * 64; 19 var zeros = "0" * 64;
20 20
21 for (int i = 0; i < whiteSpace.length; i++) { 21 for (int i = 0; i < whiteSpace.length; i++) {
22 var ws = whiteSpace[i]; 22 var ws = whiteSpace[i];
23 Expect.equals(0, int.parse("${ws}0${ws}", radix: 2)); 23 Expect.equals(0, int.parse("${ws}0${ws}", radix: 2));
24 } 24 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 testBadArguments("0", -1); 133 testBadArguments("0", -1);
134 testBadArguments("0", 0); 134 testBadArguments("0", 0);
135 testBadArguments("0", 1); 135 testBadArguments("0", 1);
136 testBadArguments("0", 37); 136 testBadArguments("0", 37);
137 137
138 // See also int_parse_radix_bad_handler_test.dart 138 // See also int_parse_radix_bad_handler_test.dart
139 } 139 }
140 140
141 bool isFail(e) => e == "FAIL"; 141 bool isFail(e) => e == "FAIL";
OLDNEW
« no previous file with comments | « tests/corelib_strong/double_parse_test.dart ('k') | tests/corelib_strong/num_parse_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698