Class ResultVerifier.SnippetRun

java.lang.Object
org.graalvm.polyglot.tck.ResultVerifier.SnippetRun
Enclosing interface:
ResultVerifier

public static final class ResultVerifier.SnippetRun extends Object
Provides the test execution data.
Since:
0.30
  • Method Details

    • getParameters

      public List<? extends org.graalvm.polyglot.Value> 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 the PolyglotException thrown during snippet execution. If the snippet execution throws an IllegalArgumentException, this exception is first converted to a PolyglotException, and the resulting PolyglotException is provided by this method.
      Returns:
      the PolyglotException thrown 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 new ResultVerifier.SnippetRun for successful execution.
      Parameters:
      snippet - the executed Snippet
      parameters - the actual parameters of snippet execution
      result - 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 new ResultVerifier.SnippetRun for failed execution.
      Parameters:
      snippet - the executed Snippet
      parameters - the actual parameters of snippet execution
      exception - the PolyglotException thrown during snippet execution
      Returns:
      the ResultVerifier.SnippetRun
      Since:
      0.30