summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Number/S9.3.1_A3_T1.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Number/S9.3.1_A3_T1.js')
-rw-r--r--js/src/tests/test262/built-ins/Number/S9.3.1_A3_T1.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Number/S9.3.1_A3_T1.js b/js/src/tests/test262/built-ins/Number/S9.3.1_A3_T1.js
new file mode 100644
index 0000000000..263c04c186
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Number/S9.3.1_A3_T1.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ The MV of StringNumericLiteral ::: StrWhiteSpaceopt StrNumericLiteral
+ StrWhiteSpaceopt is the MV of StrNumericLiteral, no matter whether white
+ space is present or not
+es5id: 9.3.1_A3_T1
+description: static string
+---*/
+assert.sameValue(
+ Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000"),
+ 0
+);
+
+assert.sameValue(
+ Number("\u0009\u000C\u0020\u00A0\u000A\u000D\u2028\u2029\u000B\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u30001234567890\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000"),
+ 1234567890
+);
+
+assert.sameValue(
+ +("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000Infinity\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000"),
+ Infinity
+);
+
+assert.sameValue(
+ Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000-Infinity\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000"),
+ -Infinity
+);
+
+reportCompare(0, 0);