Skip to content

Conversation

jugglinmike
Copy link
Contributor

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?

*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"
>     [...]
@jugglinmike
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant