OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var whitespaces = [ | 5 var whitespaces = [ |
6 // WhiteSpace defined in ECMA-262 5.1, 7.2 | 6 // WhiteSpace defined in ECMA-262 5.1, 7.2 |
7 0x0009, // Tab TAB | 7 0x0009, // Tab TAB |
8 0x000B, // Vertical Tab VT | 8 0x000B, // Vertical Tab VT |
9 0x000C, // Form Feed FF | 9 0x000C, // Form Feed FF |
10 0x0020, // Space SP | 10 0x0020, // Space SP |
11 0x00A0, // No-break space NBSP | 11 0x00A0, // No-break space NBSP |
12 0xFEFF, // Byte Order Mark BOM | 12 0xFEFF, // Byte Order Mark BOM |
13 | 13 |
14 // LineTerminator defined in ECMA-262 5.1, 7.3 | 14 // LineTerminator defined in ECMA-262 5.1, 7.3 |
15 0x000A, // Line Feed LF | 15 0x000A, // Line Feed LF |
16 0x000D, // Carriage Return CR | 16 0x000D, // Carriage Return CR |
17 0x2028, // Line Separator LS | 17 0x2028, // Line Separator LS |
18 0x2029, // Paragraph Separator PS | 18 0x2029, // Paragraph Separator PS |
19 | 19 |
20 // Unicode 6.3.0 whitespaces (category 'Zs') | 20 // Unicode 6.3.0 whitespaces (category 'Zs') |
21 0x1680, // Ogham Space Mark | 21 0x1680, // Ogham Space Mark |
22 0x180E, // Mongolian Vowel Separator | |
23 0x2000, // EN QUAD | 22 0x2000, // EN QUAD |
24 0x2001, // EM QUAD | 23 0x2001, // EM QUAD |
25 0x2002, // EN SPACE | 24 0x2002, // EN SPACE |
26 0x2003, // EM SPACE | 25 0x2003, // EM SPACE |
27 0x2004, // THREE-PER-EM SPACE | 26 0x2004, // THREE-PER-EM SPACE |
28 0x2005, // FOUR-PER-EM SPACE | 27 0x2005, // FOUR-PER-EM SPACE |
29 0x2006, // SIX-PER-EM SPACE | 28 0x2006, // SIX-PER-EM SPACE |
30 0x2007, // FIGURE SPACE | 29 0x2007, // FIGURE SPACE |
31 0x2008, // PUNCTUATION SPACE | 30 0x2008, // PUNCTUATION SPACE |
32 0x2009, // THIN SPACE | 31 0x2009, // THIN SPACE |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 test_regexp(c + twobyte); | 105 test_regexp(c + twobyte); |
107 test_trim(c, onebyte + "trim"); | 106 test_trim(c, onebyte + "trim"); |
108 test_trim(c, twobyte + "trim"); | 107 test_trim(c, twobyte + "trim"); |
109 test_parseInt(c, onebyte); | 108 test_parseInt(c, onebyte); |
110 test_parseInt(c, twobyte); | 109 test_parseInt(c, twobyte); |
111 test_eval(c, onebyte); | 110 test_eval(c, onebyte); |
112 test_eval(c, twobyte); | 111 test_eval(c, twobyte); |
113 test_stringtonumber(c, onebytespace); | 112 test_stringtonumber(c, onebytespace); |
114 test_stringtonumber(c, twobytespace); | 113 test_stringtonumber(c, twobytespace); |
115 } | 114 } |
OLD | NEW |