mirror of https://github.com/tc39/test262.git
Add more ToNumber tests for invalid binary and octal literals
This commit is contained in:
parent
4f06f98771
commit
d540256163
|
@ -18,3 +18,9 @@ info: |
|
|||
assert.sameValue(Number('0b2'), NaN, 'invalid digit');
|
||||
assert.sameValue(Number('00b0'), NaN, 'leading zero');
|
||||
assert.sameValue(Number('0b'), NaN, 'omitted digits');
|
||||
assert.sameValue(Number('+0b1'), NaN, 'plus sign');
|
||||
assert.sameValue(Number('-0b1'), NaN, 'minus sign');
|
||||
assert.sameValue(Number('0b1.01'), NaN, 'fractional part');
|
||||
assert.sameValue(Number('0b1e10'), NaN, 'exponent part');
|
||||
assert.sameValue(Number('0b1e-10'), NaN, 'exponent part with a minus sign');
|
||||
assert.sameValue(Number('0b1e+10'), NaN, 'exponent part with a plus sign');
|
||||
|
|
|
@ -18,3 +18,9 @@ info: |
|
|||
assert.sameValue(Number('0o8'), NaN, 'invalid digit');
|
||||
assert.sameValue(Number('00o0'), NaN, 'leading zero');
|
||||
assert.sameValue(Number('0o'), NaN, 'omitted digits');
|
||||
assert.sameValue(Number('+0o10'), NaN, 'plus sign');
|
||||
assert.sameValue(Number('-0o10'), NaN, 'minus sign');
|
||||
assert.sameValue(Number('0o10.01'), NaN, 'fractional part');
|
||||
assert.sameValue(Number('0o1e10'), NaN, 'exponent part');
|
||||
assert.sameValue(Number('0o1e-10'), NaN, 'exponent part with a minus sign');
|
||||
assert.sameValue(Number('0o1e+10'), NaN, 'exponent part with a plus sign');
|
||||
|
|
Loading…
Reference in New Issue