es6draft icon indicating copy to clipboard operation
es6draft copied to clipboard

PARTIAL: Support testing ResolutionException

Open jugglinmike opened this issue 9 years ago • 1 comments

This patch is incomplete!

The goal of this patch is to allow Test262 tests to express negative: SyntaxError for module loading errors such as ambiguous import bindings.

With this patch applied, the test runner fails with messages like this:

Expected: (((an instance of com.github.anba.es6draft.parser.ParserException or an instance of com.github.anba.es6draft.compiler.CompilationException or an instance of java.lang.StackOverflowError or an instance of com.github.anba.es6draft.runtime.modules.ResolutionException) or an instance of com.github.anba.es6draft.runtime.internal.ScriptException) and exception with error-message string matching 'SyntaxError')
    but: exception with error-message string matching 'SyntaxError' error-message was "ambiguous export \"x\""
Stacktrace was: com.github.anba.es6draft.runtime.modules.ResolutionException: ambiguous export "x"
[...]

@anba Do you have any advice for how to proceed?

jugglinmike avatar Mar 15 '16 17:03 jugglinmike

I've found a solution that technically works, though it's guaranteed to make you cringe :P

jugglinmike avatar Mar 28 '16 21:03 jugglinmike