Package org.graalvm.polyglot.tck
Class ResultVerifier.SnippetRun
java.lang.Object
org.graalvm.polyglot.tck.ResultVerifier.SnippetRun
- Enclosing interface:
ResultVerifier
Provides the test execution data.
- Since:
- 0.30
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResultVerifier.SnippetRuncreate(Snippet snippet, List<? extends org.graalvm.polyglot.Value> parameters, org.graalvm.polyglot.PolyglotException exception) Creates a newResultVerifier.SnippetRunfor failed execution.static ResultVerifier.SnippetRuncreate(Snippet snippet, List<? extends org.graalvm.polyglot.Value> parameters, org.graalvm.polyglot.Value result) Creates a newResultVerifier.SnippetRunfor successful execution.org.graalvm.polyglot.PolyglotExceptionReturns thePolyglotExceptionthrown during snippet execution.List<? extends org.graalvm.polyglot.Value> Returns the actual parameters of a snippet execution.org.graalvm.polyglot.ValueReturns the result of a snippet execution.
-
Method Details
-
getParameters
Returns the actual parameters of a snippet execution.- Returns:
- the parameters
- Since:
- 0.30
-
getResult
public org.graalvm.polyglot.Value getResult()Returns the result of a snippet execution.- Returns:
- the result of a snippet execution or null in case of execution failure.
- Since:
- 0.30
-
getException
public org.graalvm.polyglot.PolyglotException getException()Returns thePolyglotExceptionthrown during snippet execution. If the snippet execution throws anIllegalArgumentException, this exception is first converted to aPolyglotException, and the resultingPolyglotExceptionis provided by this method.- Returns:
- the
PolyglotExceptionthrown during the execution or null in case of successful execution. - Since:
- 0.30
-
create
public static ResultVerifier.SnippetRun create(Snippet snippet, List<? extends org.graalvm.polyglot.Value> parameters, org.graalvm.polyglot.Value result) Creates a newResultVerifier.SnippetRunfor successful execution.- Parameters:
snippet- the executedSnippetparameters- the actual parameters of snippet executionresult- the result of snippet execution- Returns:
- the
ResultVerifier.SnippetRun - Since:
- 0.30
-
create
public static ResultVerifier.SnippetRun create(Snippet snippet, List<? extends org.graalvm.polyglot.Value> parameters, org.graalvm.polyglot.PolyglotException exception) Creates a newResultVerifier.SnippetRunfor failed execution.- Parameters:
snippet- the executedSnippetparameters- the actual parameters of snippet executionexception- thePolyglotExceptionthrown during snippet execution- Returns:
- the
ResultVerifier.SnippetRun - Since:
- 0.30
-