test262 icon indicating copy to clipboard operation
test262 copied to clipboard

Negative metadata phase is inconsistent / not defined

Open davidot opened this issue 3 years ago • 0 comments

In INTERPRETING.md it says:

phase - the stage of the test interpretation process that the error is expected to be produced; valid phases are: - parse: occurs while parsing the source text, or while checking it for early errors. - resolution: occurs during module resolution. - runtime: occurs during evaluation.

However where these phases start and end is not well defined. Additionally it seems that for some test it is contradictory: test/language/import/json-invalid.js: has phase parse, presumably because the json module it imports has a SyntaxError. test/language/module-code/instn-resolve-err-syntax-1.js: has phase resolution, however it too fails because it imports a module with a SyntaxError. test/language/module-code/instn-star-err-not-found.js: has phase runtime, perhaps because the module it is importing will throw a SyntaxError during evalution however this is (in my view?) in resolution time for the initial test.

It is possible I'm missing something here, but in the spec the terms phase nor the named phases are defined.

The solution for our test262 runner I have come up with is assuming that if a SyntaxError is supposed to be thrown for a module, then if the initial module was not supposed to be evaluated it will contain $DONOTEVALUATE(), is this safe? Or is there a better solution? (See https://github.com/linusg/libjs-test262/pull/58 or I can explain further)

davidot avatar Aug 29 '22 21:08 davidot