https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js
File test/mjsunit/array-length.js (right):
https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode133
test/mjsunit/array-length.js:133: Array.prototype.toString.apply(o);
On 2014/09/23 18:28:53, wingo wrote:
probably best to assert not that the length didn't change, but rather
that the
result is sane. note that not all MAX_VALUE / MAX_SAFE_INTEGER
expressions will
be testable due to resource limitations.
Acknowledged.
https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode161
test/mjsunit/array-length.js:161:
Array.prototype.toLocaleString.apply(o);
On 2014/09/23 18:28:53, wingo wrote:
What does this evaluate to? Please tell me it's not a [ followed by
2^53 commas
:)
LOL, got to test all cases.
https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode165
test/mjsunit/array-length.js:165: assertTrue(threw);
On 2014/09/23 18:28:53, wingo wrote:
use assertThrows
I tried that, but it didn't work. This is what I get when trying to use
assertThrows:
RangeError: Invalid array length
at Object.toLocaleString (native)
at /home/dpino/workspace/v8/test/mjsunit/array-length.js:169:45
Command: /home/dpino/workspace/v8/out/x64.release/d8 --test
--random-seed=1621081974 --stress-opt --always-opt --nohard-abort
--nodead-code-elimination --nofold-constants
/home/dpino/workspace/v8/test/mjsunit/mjsunit.js
/home/dpino/workspace/v8/test/mjsunit/array-length.js
=== mjsunit/array-length ===
/home/dpino/workspace/v8/test/mjsunit/array-length.js:169: RangeError:
Invalid array length
assertThrows(Array.prototype.toLocaleString.apply(o));
If I run the same statement in the console:
d8> Array.prototype.toLocaleString.apply(o);
(d8):1: RangeError: Invalid array length
Array.prototype.toLocaleString.apply(o);
^
RangeError: Invalid array length
at Object.toLocaleString (native)
at (d8):1:32
So, I coded it this way, taking as an example
test/mjsunit/stack-traces.js:testCallerCensorship().
https://codereview.chromium.org/553623004/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.