f3568ca400
test262 "negative" test expectations list which exception is thrown. The ES2017 draft specification is very specific about which exception class is thrown from which path, and V8 works hard to be correct with respect to that spec. Previously, the test262 test runner would accept any nonzero status code, such as from a crash, or a FAIL printed out, for a negative test. This patch makes negative tests check for the right answer using a quick-and-dirty parsing of the exception printing from d8 to find the exception class. It invokes d8 in a way to get a status code of 0 from thrown exceptions so that 'negative' tests aren't actually implemented by negating the output. Amazingly, this didn't catch any test262 failures, but I verified the extra checking interactively by changing a negative test to expect a different type and saw it fail. BUG=v8:4803 R=machenbach LOG=Y Review URL: https://codereview.chromium.org/1766503002 Cr-Commit-Position: refs/heads/master@{#34763} |
||
---|---|---|
.. | ||
lib | ||
promises-aplus.status | ||
README | ||
testcfg.py |
This directory contains code for running Promise/A+ Compliance Test Suite[1]. You can download the it from [1], or by specifying --download to tools/run-tests.py. Promise/A+ Compliance Test Suite requires Node environment and needs some libraries. To run it in d8 shell, we provides some emulation functions in the lib/ directory. - lib/adapter.js - An adapter for harmony Promise used in Promise/A+ tests. - lib/assert.js - Emulates assert modules in Node. - lib/global.js - Provides global functions and variables. - lib/mocha.js - Emulates Mocha[2] test framework. - lib/require.j - Emulate require function in Node. - lib/run-tests.js - Run all describe tests. The emulation is not complete. Upgrading Promise/A+ tests will require changing lib/ scripts. Sinon.JS[3], required by Promise/A+ tests, is also downloaded by run-tests.py. [1]: https://github.com/promises-aplus/promises-tests [2]: http://visionmedia.github.io/mocha/ [3]: http://sinonjs.org/