mirror of
https://github.com/dart-lang/sdk
synced 2024-09-21 14:41:18 +00:00
Remove U+180E from whitespace in js_runtime and tests
BUG= https://github.com/dart-lang/sdk/issues/28983 R=alanknight@google.com, vsm@google.com Review-Url: https://codereview.chromium.org/2733353002 .
This commit is contained in:
parent
a83e7fd18e
commit
c6a01283c1
|
@ -170,13 +170,12 @@ class JSString extends Interceptor implements String, JSIndexable {
|
|||
r'#.toUpperCase()', this);
|
||||
}
|
||||
|
||||
// Characters with Whitespace property (Unicode 6.2).
|
||||
// Characters with Whitespace property (Unicode 6.3).
|
||||
// 0009..000D ; White_Space # Cc <control-0009>..<control-000D>
|
||||
// 0020 ; White_Space # Zs SPACE
|
||||
// 0085 ; White_Space # Cc <control-0085>
|
||||
// 00A0 ; White_Space # Zs NO-BREAK SPACE
|
||||
// 1680 ; White_Space # Zs OGHAM SPACE MARK
|
||||
// 180E ; White_Space # Zs MONGOLIAN VOWEL SEPARATOR
|
||||
// 2000..200A ; White_Space # Zs EN QUAD..HAIR SPACE
|
||||
// 2028 ; White_Space # Zl LINE SEPARATOR
|
||||
// 2029 ; White_Space # Zp PARAGRAPH SEPARATOR
|
||||
|
@ -205,7 +204,6 @@ class JSString extends Interceptor implements String, JSIndexable {
|
|||
}
|
||||
switch (codeUnit) {
|
||||
case 0x1680:
|
||||
case 0x180E:
|
||||
case 0x2000:
|
||||
case 0x2001:
|
||||
case 0x2002:
|
||||
|
|
|
@ -17,7 +17,6 @@ string_from_environment_test: Skip
|
|||
[ $compiler == none || $compiler == precompiler || $compiler == app_jit ]
|
||||
unicode_test: Fail # Bug 6706
|
||||
compare_to2_test: Fail # Bug 4018
|
||||
|
||||
symbol_test/01: Fail, Pass # bug 11669
|
||||
|
||||
# With the exception of 'void', new Symbol() should not accept reserved words.
|
||||
|
@ -29,6 +28,9 @@ symbol_test/none: Fail # bug 11669
|
|||
symbol_operator_test/03: Fail # bug 11669
|
||||
string_case_test/01: Fail # Bug 18061
|
||||
|
||||
[ $compiler == none && ($runtime == drt || $runtime == dartium || $runtime == vm)]
|
||||
string_trimlr_test/02: Fail # Issue 29060
|
||||
|
||||
# #void should be a valid symbol.
|
||||
[ $compiler == none || $compiler == precompiler || $compiler == app_jit || $compiler == dart2js ]
|
||||
symbol_reserved_word_test/02: CompileTimeError # bug 20191
|
||||
|
@ -78,6 +80,7 @@ double_parse_test/02: Fail, OK
|
|||
[ $runtime == safari || $runtime == safarimobilesim ]
|
||||
double_round3_test: Fail, OK # Runtime rounds 0.49999999999999994 to 1.
|
||||
double_round_to_double2_test: Fail, OK # Runtime rounds 0.49999999999999994 to 1.
|
||||
string_trimlr_test/02: Fail # Uses Unicode 6.2.0 or earlier.
|
||||
|
||||
[ $runtime == ff ]
|
||||
double_round3_test: Pass, Fail, OK # Fails on ff 34, passes on ff 35. Runtime rounds 0.49999999999999994 to 1.
|
||||
|
@ -107,28 +110,23 @@ regress_r21715_test: RuntimeError # Requires bigint support.
|
|||
|
||||
[ $compiler == dart2js && $runtime == chromeOnAndroid ]
|
||||
list_as_map_test: Pass, Slow # TODO(kasperl): Please triage.
|
||||
string_trimlr_test/02: Fail # Browser uses Unicode 6.2.0 or earlier.
|
||||
|
||||
[ $compiler == dart2js && $runtime == safarimobilesim ]
|
||||
string_split_test: RuntimeError # Issue 21431
|
||||
|
||||
[ $compiler == dart2js && $runtime == safarimobilesim ]
|
||||
list_test/01: Fail # Safari bug: Array(-2) seen as dead code.
|
||||
string_trimlr_test/none: Fail
|
||||
string_trimlr_test/01: Fail
|
||||
string_trimlr_test/02: Fail # Browser uses Unicode 6.2.0 or earlier.
|
||||
|
||||
[ $compiler == dart2js && $runtime == ie10 ]
|
||||
string_case_test/01: Fail, OK # Bug in IE.
|
||||
string_case_test/02: Fail, OK # Bug in IE.
|
||||
string_trimlr_test/02: Fail # Browser uses Unicode 6.2.0 or earlier.
|
||||
|
||||
[ $compiler == dart2js && ($runtime == ff || $runtime == jsshell) ]
|
||||
string_case_test/01: Fail, OK # Bug in Firefox.
|
||||
int_parse_radix_test/none: Pass, RuntimeError # Issue 28983
|
||||
string_trim2_test: Pass, RuntimeError # Issue 28983
|
||||
string_trimlr_test/01: Pass, RuntimeError # Issue 28983
|
||||
string_trimlr_test/none: Pass, RuntimeError # Issue 28983
|
||||
double_parse_test/03: Pass, RuntimeError # Issue 28983
|
||||
double_parse_test/none: Pass, RuntimeError # Issue 28983
|
||||
num_parse_test/01: Pass, RuntimeError # Issue 28983
|
||||
num_parse_test/none: Pass, RuntimeError # Issue 28983
|
||||
|
||||
[ $compiler == dart2js && ($runtime == ff || $runtime == jsshell) && $fast_startup == false]
|
||||
list_test/none: RuntimeError # Issue 27871, Issue 28014, proably Bug in jsshell / Firefox
|
||||
|
@ -170,6 +168,9 @@ stopwatch_test: Skip # Flaky test due to expected performance behaviour.
|
|||
# The regexp tests are not verified to work on non d8/vm platforms yet.
|
||||
regexp/*: Skip
|
||||
|
||||
[ $runtime == d8 ]
|
||||
string_trimlr_test/02: Fail # Uses Unicode 6.2.0 or earlier.
|
||||
|
||||
[ $runtime == vm || $runtime == dart_precompiled ]
|
||||
regexp/global_test: Skip # Timeout. Issue 21709 and 21708
|
||||
regexp/pcre_test: Pass, Slow, Timeout # Issues 21593 and 22008
|
||||
|
|
|
@ -17,7 +17,6 @@ const whiteSpace = const [
|
|||
"\x85", /// 01: ok
|
||||
"\xa0",
|
||||
"\u1680",
|
||||
"\u180e",
|
||||
"\u2000",
|
||||
"\u2001",
|
||||
"\u2002",
|
||||
|
|
|
@ -14,7 +14,6 @@ const whiteSpace = const [
|
|||
"\x85",
|
||||
"\xa0",
|
||||
"\u1680",
|
||||
"\u180e",
|
||||
"\u2000",
|
||||
"\u2001",
|
||||
"\u2002",
|
||||
|
|
|
@ -14,7 +14,6 @@ const WHITESPACE = const [
|
|||
0x85,
|
||||
0xA0,
|
||||
0x1680,
|
||||
0x180E,
|
||||
0x2000,
|
||||
0x2001,
|
||||
0x2002,
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// Characters with Whitespace property (Unicode 6.2).
|
||||
// Characters with Whitespace property (Unicode 6.3).
|
||||
// 0009..000D ; White_Space # Cc <control-0009>..<control-000D>
|
||||
// 0020 ; White_Space # Zs SPACE
|
||||
// 0085 ; White_Space # Cc <control-0085>
|
||||
// 00A0 ; White_Space # Zs NO-BREAK SPACE
|
||||
// 1680 ; White_Space # Zs OGHAM SPACE MARK
|
||||
// 180E ; White_Space # Zs MONGOLIAN VOWEL SEPARATOR
|
||||
// 2000..200A ; White_Space # Zs EN QUAD..HAIR SPACE
|
||||
// 2028 ; White_Space # Zl LINE SEPARATOR
|
||||
// 2029 ; White_Space # Zp PARAGRAPH SEPARATOR
|
||||
|
@ -29,7 +28,6 @@ const WHITESPACE = const [
|
|||
0x85,
|
||||
0xA0,
|
||||
0x1680,
|
||||
0x180E,
|
||||
0x2000,
|
||||
0x2001,
|
||||
0x2002,
|
||||
|
@ -89,15 +87,25 @@ main() {
|
|||
j++;
|
||||
continue;
|
||||
}
|
||||
// U+200b is currently being treated as whitespace by some JS engines.
|
||||
// Should be fixed in tip-of-tree V8 per 2014-02-10.
|
||||
// This line makes string_trimlr_test/none fail but /01 succeede where
|
||||
// this bug is in the JS. Both succeede on the VM and where the bug is
|
||||
// not. Remove this line and comment if all JS engines fix it.
|
||||
if (i == 0x200b) continue; /// 01: ok
|
||||
// See below for these exceptions.
|
||||
if (i == 0x180E) continue;
|
||||
if (i == 0x200B) continue;
|
||||
|
||||
var s = new String.fromCharCode(i);
|
||||
Expect.identical(s, s.trimLeft());
|
||||
Expect.identical(s, s.trimRight());
|
||||
}
|
||||
|
||||
// U+200b is currently being treated as whitespace by some JS engines.
|
||||
// string_trimlr_test/01 fails on these engines.
|
||||
// Should be fixed in tip-of-tree V8 per 2014-02-10.
|
||||
var s200B = new String.fromCharCode(0x200B);
|
||||
Expect.identical(s200B, s200B.trimLeft()); /// 01: ok
|
||||
Expect.identical(s200B, s200B.trimRight()); /// 01: ok
|
||||
|
||||
// U+180E ceased to be whitespace in Unicode version 6.3.0
|
||||
// string_trimlr_test/02 fails on implementations using earlier versions.
|
||||
var s180E = new String.fromCharCode(0x180E);
|
||||
Expect.identical(s180E, s180E.trimLeft()); /// 02: ok
|
||||
Expect.identical(s180E, s180E.trimRight()); /// 02: ok
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ const whiteSpace = const [
|
|||
"\x85", /// 01: ok
|
||||
"\xa0",
|
||||
"\u1680",
|
||||
"\u180e",
|
||||
"\u2000",
|
||||
"\u2001",
|
||||
"\u2002",
|
||||
|
|
|
@ -11,7 +11,7 @@ void main() {
|
|||
const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20"
|
||||
"\x85" /// 01: ok
|
||||
"\xa0";
|
||||
const String whiteSpace = "$oneByteWhiteSpace\u1680\u180e"
|
||||
const String whiteSpace = "$oneByteWhiteSpace\u1680"
|
||||
"\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a"
|
||||
"\u2028\u2029\u202f\u205f\u3000\ufeff";
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ const whiteSpace = const [
|
|||
"\x85",
|
||||
"\xa0",
|
||||
"\u1680",
|
||||
"\u180e",
|
||||
"\u2000",
|
||||
"\u2001",
|
||||
"\u2002",
|
||||
|
|
|
@ -14,7 +14,6 @@ const WHITESPACE = const [
|
|||
0x85,
|
||||
0xA0,
|
||||
0x1680,
|
||||
0x180E,
|
||||
0x2000,
|
||||
0x2001,
|
||||
0x2002,
|
||||
|
|
|
@ -4,13 +4,12 @@
|
|||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// Characters with Whitespace property (Unicode 6.2).
|
||||
// Characters with Whitespace property (Unicode 6.3).
|
||||
// 0009..000D ; White_Space # Cc <control-0009>..<control-000D>
|
||||
// 0020 ; White_Space # Zs SPACE
|
||||
// 0085 ; White_Space # Cc <control-0085>
|
||||
// 00A0 ; White_Space # Zs NO-BREAK SPACE
|
||||
// 1680 ; White_Space # Zs OGHAM SPACE MARK
|
||||
// 180E ; White_Space # Zs MONGOLIAN VOWEL SEPARATOR
|
||||
// 2000..200A ; White_Space # Zs EN QUAD..HAIR SPACE
|
||||
// 2028 ; White_Space # Zl LINE SEPARATOR
|
||||
// 2029 ; White_Space # Zp PARAGRAPH SEPARATOR
|
||||
|
@ -29,7 +28,6 @@ const WHITESPACE = const [
|
|||
0x85,
|
||||
0xA0,
|
||||
0x1680,
|
||||
0x180E,
|
||||
0x2000,
|
||||
0x2001,
|
||||
0x2002,
|
||||
|
|
|
@ -237,9 +237,6 @@ mirrors/mirrors_used_get_name2_test: RuntimeError
|
|||
convert/streamed_conversion_utf8_decode_test: Pass, Slow # Issue 12029
|
||||
mirrors/mirrors_reader_test: Timeout, Slow, RuntimeError # Issue 16589
|
||||
|
||||
[ $compiler == dart2js && $runtime == ff ]
|
||||
math/math_parse_double_test: Pass, RuntimeError # Issue 28983
|
||||
|
||||
[ $runtime == chrome && $system == macos ]
|
||||
async/timer_isActive_test: Fail, Pass, Timeout # Issue 22696
|
||||
async/slow_consumer_test: Pass, Timeout # Issue 22696
|
||||
|
|
|
@ -26,7 +26,6 @@ void runTest(double expected, String input) {
|
|||
Expect.equals(expected, double.parse("\xA0 +$input\xA0 "));
|
||||
Expect.equals(expected, double.parse("+$input\xA0 "));
|
||||
Expect.equals(expected, double.parse("\u205F $input\u205F "));
|
||||
Expect.equals(expected, double.parse(" \u180E$input"));
|
||||
Expect.equals(expected, double.parse("$input \u2006"));
|
||||
Expect.equals(expected, double.parse("\u1680 +$input\u1680 "));
|
||||
Expect.equals(-expected, double.parse("-$input"));
|
||||
|
|
|
@ -26,7 +26,6 @@ void runTest(double expected, String input) {
|
|||
Expect.equals(expected, double.parse("\xA0 +$input\xA0 "));
|
||||
Expect.equals(expected, double.parse("+$input\xA0 "));
|
||||
Expect.equals(expected, double.parse("\u205F $input\u205F "));
|
||||
Expect.equals(expected, double.parse(" \u180E$input"));
|
||||
Expect.equals(expected, double.parse("$input \u2006"));
|
||||
Expect.equals(expected, double.parse("\u1680 +$input\u1680 "));
|
||||
Expect.equals(-expected, double.parse("-$input"));
|
||||
|
|
Loading…
Reference in a new issue