es6draft
es6draft copied to clipboard
PARTIAL: Support testing ResolutionException
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?
I've found a solution that technically works, though it's guaranteed to make you cringe :P