Top Fields Constructors Methods
org.graalvm.polyglot.tck

pack-priv final Class IdentityFunctionResultVerifier

extends Object
implements ResultVerifier
Class Inheritance
All Implemented Interfaces
org.graalvm.polyglot.tck.ResultVerifier, java.util.function.Consumer
Imports
org.graalvm.polyglot.PolyglotException, .Value

Field Summary

Modifier and TypeField and Description
pack-priv static final ResultVerifier

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
accept(ResultVerifier.SnippetRun
the snippet execution data. The SnippetRun provides the actual snippet parameters, the execution result, or the PolyglotException thrown by the execution. If the snippet execution throws an IllegalArgumentException, it's converted to PolyglotException.
snippetRun
)

Implements org.graalvm.polyglot.tck.ResultVerifier.accept.

Performs a verification of a result of a snippet execution.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final ResultVerifier INSTANCE

Constructor Detail

IdentityFunctionResultVerifierback to summary
private IdentityFunctionResultVerifier()

Method Detail

acceptback to summary
public void accept(ResultVerifier.SnippetRun snippetRun) throws PolyglotException

Implements org.graalvm.polyglot.tck.ResultVerifier.accept.

Doc from org.graalvm.polyglot.tck.ResultVerifier.accept.

Performs a verification of a result of a snippet execution. The custom ResultVerifier overrides the default snippet execution verification. The default verification tests that the result type is in bounds specified by the Snippet. The custom ResultVerifier can be used to do additional checking of a result or an execution exception throwing AssertionError in case of failed assertion. The custom ResultVerifier can hide an expected execution exception. For example the division operator snippet may provide a custom ResultVerifier hiding the execution exception for division by zero. To propagate the execution exception the ResultVerifier should re-throw it. The ResultVerifier can be used to resolve problems in the ErrorTypeTest by making the Snippet's parameter(s) more generic and restrict the required value in the verifier.

Parameters
snippetRun:ResultVerifier.SnippetRun

the snippet execution data. The SnippetRun provides the actual snippet parameters, the execution result, or the PolyglotException thrown by the execution. If the snippet execution throws an IllegalArgumentException, it's converted to PolyglotException.

Exceptions
PolyglotException:
may propagate the PolyglotException from the snippetRun