# ⬢ truffle-tck 25.6.0-elide.4 Every page: [llms.txt](llms.txt), or all in one file: [llms-full.txt](llms-full.txt) API reference for truffle-tck. ## Packages - [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md): Contains testing utilities like com.oracle.truffle.tck.DebuggerTester and com.oracle.truffle.tck.TruffleRunner. - [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md): No description. ## Types in `com.oracle.truffle.tck` - [`DebuggerTester`](com/oracle/truffle/tck/DebuggerTester.md) (class): Test utility class that makes it easier to test and debug debugger functionality for guest languages. - [`DebuggerTester.PositionPredicate`](com/oracle/truffle/tck/DebuggerTester.PositionPredicate.md) (interface): Predicate of testable positions. - [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md) (class): JUnit test runner for unit testing Truffle AST interpreters. - [`TruffleRunner.Inject`](com/oracle/truffle/tck/TruffleRunner.Inject.md) (annotation interface): A parameter annotated with Inject specifies the RootNode of the test AST. - [`TruffleRunner.ParametersFactory`](com/oracle/truffle/tck/TruffleRunner.ParametersFactory.md) (class): ParametersRunnerFactory for testing Truffle AST interpreters using Parameterized unit tests. - [`TruffleRunner.RunWithPolyglotRule`](com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.md) (class): JUnit rule to run the tests in the context of a polyglot engine. - [`TruffleRunner.Warmup`](com/oracle/truffle/tck/TruffleRunner.Warmup.md) (annotation interface): A test method can be annotated with Warmup to specify how many warmup iterations of a test should be done before the Truffle tree is compiled. - [`TruffleTestInvokerTruffleTestInvokerLanguageProvider`](com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.md) (class): No description. ## Types in `com.oracle.truffle.tck.impl` - [`PolyglotEngineWithJavaScript`](com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.md) (class): Tests with code snippets referencing JavaScript (executed only when an implementation of JavaScript is around). - [`PolyglotEngineWithJavaScript.Moment`](com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.Moment.md) (class): No description. - [`PolyglotEngineWithR`](com/oracle/truffle/tck/impl/PolyglotEngineWithR.md) (class): Tests with code snippets in R language (executed only when an implementation of R is around). - [`PolyglotEngineWithRuby`](com/oracle/truffle/tck/impl/PolyglotEngineWithRuby.md) (class): Tests with code snippets referencing Ruby (executed only when implementation of Ruby is around). - [`TckLanguage`](com/oracle/truffle/tck/impl/TckLanguage.md) (class): No description. - [`TckLanguageProvider`](com/oracle/truffle/tck/impl/TckLanguageProvider.md) (class): No description. - [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md) (abstract class): No description. - [`TruffleLanguageRunner.JavaScriptRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.JavaScriptRunner.md) (class): No description. - [`TruffleLanguageRunner.RRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.RRunner.md) (class): No description. - [`TruffleLanguageRunner.RubyRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.RubyRunner.md) (class): No description. # ▣ com.oracle.truffle.tck [truffle-tck](index.md) · Every page: [llms.txt](llms.txt) Package in truffle-tck. Since 0.8 or older. Contains testing utilities like [`com.oracle.truffle.tck.DebuggerTester`](com/oracle/truffle/tck/DebuggerTester.md) and [`com.oracle.truffle.tck.TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md). ## Classes - [`DebuggerTester`](com/oracle/truffle/tck/DebuggerTester.md): Test utility class that makes it easier to test and debug debugger functionality for guest languages. - [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md): JUnit test runner for unit testing Truffle AST interpreters. - [`TruffleTestInvokerTruffleTestInvokerLanguageProvider`](com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.md): No description. # ◆ DebuggerTester [truffle-tck](index.md) › [com.oracle.truffle.tck](com/oracle/truffle/tck/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md). Since 0.16. ```java public final class DebuggerTester implements AutoCloseable ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `DebuggerTester` Implements: [`AutoCloseable`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AutoCloseable.html) Test utility class that makes it easier to test and debug debugger functionality for guest languages. Testing suspended callbacks can be cumbersome when having to assert multiple sequential events. The debugger tester allows to test suspended callbacks using sequential code that allows to assert multiple [`events`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/debug/SuspendedEvent.html). It does so by running the engine on a separate thread and it uses internal APIs to allow access to the [`SuspendedEvent`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/debug/SuspendedEvent.html) from another Thread. Do not use this class for anything else than testing. The debugger tester can print debug traces to standard output with -Dtruffle.debug.trace=true. Example usage: ```java public void testDebugging() { try (DebuggerTester tester = new DebuggerTester()) { // use your guest language source here Source source = null; try (DebuggerSession session = tester.startSession()) { session.suspendNextExecution(); tester.startEval(source); tester.expectSuspended(new SuspendedCallback() { @Override public void onSuspend(SuspendedEvent event) { // assert suspended event is proper here event.prepareStepInto(1); } }); tester.expectSuspended(new SuspendedCallback() { @Override public void onSuspend(SuspendedEvent event) { // assert another suspended event is proper here event.prepareContinue(); } }); // expect no more suspended events tester.expectDone(); } } } ``` ## Nested types - [`DebuggerTester.PositionPredicate`](com/oracle/truffle/tck/DebuggerTester.PositionPredicate.md) (interface): Predicate of testable positions. ## Constructors ### DebuggerTester() `public DebuggerTester()`. Since 0.16. Constructs a new debugger tester instance. Boots up a new `context` on Thread in the background. The tester instance needs to be `closed` after use. Throws an AssertionError if the engine initialization fails. Cite: `com/oracle/truffle/tck/DebuggerTester.html#()` ### DebuggerTester(Context.Builder) `public DebuggerTester(Context.Builder contextBuilder)`. Since 0.31. Constructs a new debugger tester instance with a pre-set context builder. Parameters: `contextBuilder` `Context.Builder`: a pre-set context builder. Only out and err streams are set on this builder prior the `Context` instance creation. See also: `DebuggerTester()`. Cite: `com/oracle/truffle/tck/DebuggerTester.html#(org.graalvm.polyglot.Context.Builder)` ### DebuggerTester(Engine, Context.Builder) `public DebuggerTester(Engine engine, Context.Builder contextBuilder)`. Since 25.0. Constructs a new debugger tester instance with a pre-set context builder and engine. Parameters: `engine` `Engine`: engine to use for the context builder. `contextBuilder` `Context.Builder`: a pre-set context builder. Only out and err streams are set on this builder prior the `Context` instance creation. See also: `DebuggerTester()`. Cite: `com/oracle/truffle/tck/DebuggerTester.html#(org.graalvm.polyglot.Engine,org.graalvm.polyglot.Context.Builder)` ## Methods ### getErr() `public String getErr()`. Since 0.16. Returns the error output of the underlying `context`. Cite: `com/oracle/truffle/tck/DebuggerTester.html#getErr()` ### getOut() `public String getOut()`. Since 0.16. Returns the standard output of the underlying `context`. Cite: `com/oracle/truffle/tck/DebuggerTester.html#getOut()` ### getDebugger() `public Debugger getDebugger()`. Since 0.27. Get the Debugger instance associated with the current engine. Cite: `com/oracle/truffle/tck/DebuggerTester.html#getDebugger()` ### startSession() `public DebuggerSession startSession()`. Since 0.16. Starts a new [`debugger session`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/debug/Debugger.html#startSession%28com.oracle.truffle.api.debug.SuspendedCallback%29) in the context's `engine`. The debugger session allows to suspend the execution and to install breakpoints. If multiple sessions are created for one `evaluation` then all suspended events are delegated to this debugger tester instance. Returns `DebuggerSession`: a new debugger session. Cite: `com/oracle/truffle/tck/DebuggerTester.html#startSession()` ### startSession(SourceElement...) `public DebuggerSession startSession(SourceElement... sourceElements)`. Since 0.33. Starts a new [`debugger session`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/debug/Debugger.html#startSession%28com.oracle.truffle.api.debug.SuspendedCallback,com.oracle.truffle.api.debug.SourceElement...%29) in the context's `engine`. The debugger session allows to suspend the execution on the provided source elements and to install breakpoints. If multiple sessions are created for one `evaluation` then all suspended events are delegated to this debugger tester instance. Parameters: `sourceElements` `SourceElement...`: a list of source elements. Returns `DebuggerSession`: a new debugger session. Cite: `com/oracle/truffle/tck/DebuggerTester.html#startSession(com.oracle.truffle.api.debug.SourceElement...)` ### startEval(Source) `public void startEval(Source s)`. Since 0.27. Starts a new `evaluation` on the background thread. Only one evaluation can be active at a time. Please ensure that `expectDone()` completed successfully before starting a new evaluation. When no source is available please refer to `DebuggerTester.startExecute(Function)`. Throws an [`IllegalStateException`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html) if another evaluation is still executing or the tester is already closed. Cite: `com/oracle/truffle/tck/DebuggerTester.html#startEval(org.graalvm.polyglot.Source)` ### startExecute(Function) `public void startExecute(Function script)`. Since 20.0. Starts a new script evaluation on the background thread. Only one evaluation can be active at a time. Please ensure that `expectDone()` completed successfully before starting a new evaluation. If a Source is available please refer to `DebuggerTester.startEval(Source)` . Throws an [`IllegalStateException`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html) if another evaluation is still executing or the tester is already closed. Cite: `com/oracle/truffle/tck/DebuggerTester.html#startExecute(java.util.function.Function)` ### expectSuspended(SuspendedCallback) `public void expectSuspended(SuspendedCallback callback)`. Since 0.16. Expects a suspended event and returns it for potential assertions. If the execution completed or was killed instead then an assertion error is thrown. The returned suspended event is only valid until on of `expectKilled()`, `expectSuspended(SuspendedCallback)` or `expectDone()` is called again. Throws an [`IllegalStateException`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html) if the tester is already closed. Parameters: `callback` `SuspendedCallback`: handler to be called when the execution is suspended. Cite: `com/oracle/truffle/tck/DebuggerTester.html#expectSuspended(com.oracle.truffle.api.debug.SuspendedCallback)` ### expectSuspended(SuspendedCallback, Function) `public void expectSuspended(SuspendedCallback callback, Function errorVerifier)`. Since 24.1. Expects a suspended event and returns it for potential assertions, allows to verify errors printed to the error output. Parameters: `callback` `SuspendedCallback`: handler to be called when the execution is suspended. `errorVerifier` `Function`: handler, which returns `true` when the error is expected. Cite: `com/oracle/truffle/tck/DebuggerTester.html#expectSuspended(com.oracle.truffle.api.debug.SuspendedCallback,java.util.function.Function)` ### expectThrowable() `public Throwable expectThrowable()`. Since 0.16. Expects the current evaluation to be completed with an error and not be killed or to produce further suspended events. It returns a string representation of the result value to be asserted. If the evaluation caused any errors they are thrown as [`AssertionError`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AssertionError.html). Throws an [`IllegalStateException`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html) if the tester is already closed. Cite: `com/oracle/truffle/tck/DebuggerTester.html#expectThrowable()` ### expectDone() `public String expectDone()`. Since 0.16. Expects the current evaluation to be completed successfully and not be killed or to produce further suspended events. It returns a string representation of the result value to be asserted. If the evaluation caused any errors they are thrown as [`AssertionError`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AssertionError.html). Throws an [`IllegalStateException`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html) if the tester is already closed. Cite: `com/oracle/truffle/tck/DebuggerTester.html#expectDone()` ### expectKilled() `public void expectKilled()`. Since 0.16. Expects the current evaluation to be killed and not be completed or to produce further suspended events. Throws an [`IllegalStateException`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalStateException.html) if the tester is already closed. If the evaluation caused any errors besides the kill exception then they are thrown as [`AssertionError`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/AssertionError.html). Cite: `com/oracle/truffle/tck/DebuggerTester.html#expectKilled()` ### getEvalThread() `public Thread getEvalThread()`. Since 0.16. Returns the thread that the execution started with `startEval(Source)` is running on. Returns `Thread`: the thread instance. Cite: `com/oracle/truffle/tck/DebuggerTester.html#getEvalThread()` ### closeEngine() `public void closeEngine()`. Since 0.30. Close the engine. It's not possible to evaluate code after engine is closed, use it when the engine needs to be closed before the debugger session. Cite: `com/oracle/truffle/tck/DebuggerTester.html#closeEngine()` ### close() `public void close()`. Since 0.16. Closes the current debugger tester session and all its associated resources like the background thread. The debugger tester becomes unusable after closing. Overrides `close()`. Cite: `com/oracle/truffle/tck/DebuggerTester.html#close()` ### assertLineBreakpointsResolution(String, String, String) `public void assertLineBreakpointsResolution(String sourceWithMarks, String resolvedMarkName, String language)`. Since 0.33. Utility method that checks proper resolution of line breakpoints. Breakpoints are submitted to every line of the source and their resolution location is checked. The source need to contain resolution marks in the form of "`R_`" where \ is line number of the original breakpoint position and `R` is the resolved mark name. These marks need to be placed at the proper breakpoint resolution line/column position, for a breakpoint submitted to every line. When several submitted breakpoints resolve to the same position, an interval can be specified in the form of "`R-_`", where both start and end line numbers are inclusive. The marks are stripped off before execution. The guest language code with marks may look like: Parameters: `sourceWithMarks` `String`: a source text, which contains the resolution marks. `resolvedMarkName` `String`: the mark name. It is used in a regular expression, therefore the mark must not have a special meaning in a regular expression. `language` `String`: the source language. Cite: `com/oracle/truffle/tck/DebuggerTester.html#assertLineBreakpointsResolution(java.lang.String,java.lang.String,java.lang.String)` ```java // test function test(n) { if (R1-3_n <= 1) { return R4_2 * n; } return R5-7_n - 1; } ``` ### assertLineBreakpointsResolution(String, DebuggerTester.PositionPredicate, …) `public void assertLineBreakpointsResolution(String sourceWithMarks, DebuggerTester.PositionPredicate positionPredicate, String resolvedMarkName, String language)`. Since 19.3.0. Parameters: `positionPredicate` `DebuggerTester.PositionPredicate`: `null` to test line breakpoints on all lines, or a predicate that limits the testable lines. See also: `assertLineBreakpointsResolution(java.lang.String, java.lang.String, java.lang.String)`. Cite: `com/oracle/truffle/tck/DebuggerTester.html#assertLineBreakpointsResolution(java.lang.String,com.oracle.truffle.tck.DebuggerTester.PositionPredicate,java.lang.String,java.lang.String)` ### assertColumnBreakpointsResolution(String, String, …) `public void assertColumnBreakpointsResolution(String sourceWithMarks, String breakpointMarkName, String resolvedMarkName, String language)`. Since 0.33. Utility method that checks proper resolution of column breakpoints. Breakpoints are submitted to marked positions and their resolution location is checked. The source need to contain both breakpoint submission marks in the form of "B\\_" and breakpoint resolution marks in the form of "R\\_" where \ is an identification of the breakpoint. These marks need to be placed at the proper breakpoint submission/resolution line/column position. When several submitted breakpoints resolve to the same position, an interval can be specified in the form of "R\-\\_", where both start and end line numbers are inclusive. The marks are stripped off before execution. The guest language code with marks may look like: Parameters: `sourceWithMarks` `String`: a source text, which contains the resolution marks. `breakpointMarkName` `String`: the breakpoint submission mark name. It is used in a regular expression, therefore the mark must not have a special meaning in a regular expression. `resolvedMarkName` `String`: the resolved mark name. It is used in a regular expression, therefore the mark must not have a special meaning in a regular expression. `language` `String`: the source language. Cite: `com/oracle/truffle/tck/DebuggerTester.html#assertColumnBreakpointsResolution(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` ```java // B1_test function B2_test(n) {B3_ if (R1-4_n <= B4_1) {B5_ return R5_2 * n; } return R6_n - 1; B6_} ``` ### assertColumnBreakpointsResolution(String, String, …) `public void assertColumnBreakpointsResolution(String sourceWithMarks, String breakpointMarkName, String resolvedMarkName, String language, URI bpURI)`. Cite: `com/oracle/truffle/tck/DebuggerTester.html#assertColumnBreakpointsResolution(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.net.URI)` ### assertBreakpointsBreakEverywhere(Source) `public void assertBreakpointsBreakEverywhere(Source source)`. Since 0.33. Utility method that tests if a breakpoint submitted to any location in the source code suspends the execution. A two-pass test is performed. In the first pass, line breakpoints are submitted to every line. In the second pass, breakpoints are submitted to every line and column combination, even outside the source scope. It is expected that the breakpoints resolve to a nearest suspendable location and it is checked that all breakpoints are hit. Parameters: `source` `Source`: a source to evaluate with breakpoints submitted everywhere. Cite: `com/oracle/truffle/tck/DebuggerTester.html#assertBreakpointsBreakEverywhere(org.graalvm.polyglot.Source)` ### assertBreakpointsBreakEverywhere(Source, DebuggerTester.PositionPredicate) `public void assertBreakpointsBreakEverywhere(Source source, DebuggerTester.PositionPredicate positionPredicate)`. Since 19.3.0. Utility method that tests if a breakpoint submitted to any location permitted by the `PositionPredicate` in the source code suspends the execution. A two-pass test is performed. In the first pass, line breakpoints are submitted to every testable line. In the second pass, breakpoints are submitted to every testable line and column combination, even outside the source scope, if permitted by the `PositionPredicate`. It is expected that the breakpoints resolve to a nearest suspendable location and it is checked that all submitted breakpoints are hit. Parameters: `source` `Source`: a source to evaluate with breakpoints submitted everywhere. `positionPredicate` `DebuggerTester.PositionPredicate`: `null` to submit breakpoints everywhere, or a predicate that limits the testable positions. Cite: `com/oracle/truffle/tck/DebuggerTester.html#assertBreakpointsBreakEverywhere(org.graalvm.polyglot.Source,com.oracle.truffle.tck.DebuggerTester.PositionPredicate)` ### getSourceImpl(Source) `public static Source getSourceImpl(Source source)`. Since 0.28. Get [`Truffle Source`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/source/Source.html) that corresponds to the `Polyglot Source`. This is a bridge between the two Source implementations. Cite: `com/oracle/truffle/tck/DebuggerTester.html#getSourceImpl(org.graalvm.polyglot.Source)` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◇ DebuggerTester.PositionPredicate [truffle-tck](index.md) › [com.oracle.truffle.tck](com/oracle/truffle/tck/index.md) · Every page: [llms.txt](llms.txt) Interface in [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md). Since 19.3.0. Nested in [`DebuggerTester`](com/oracle/truffle/tck/DebuggerTester.md). ```java public interface DebuggerTester.PositionPredicate ``` Predicate of testable positions. ## Methods ### testLine(int) `boolean testLine(int line)`. Since 19.3.0. Whether to test at the line. Cite: `com/oracle/truffle/tck/DebuggerTester.PositionPredicate.html#testLine(int)` ### testLineColumn(int, int) `boolean testLineColumn(int line, int column)`. Since 19.3.0. Whether to test at the line and column position. Cite: `com/oracle/truffle/tck/DebuggerTester.PositionPredicate.html#testLineColumn(int,int)` # ◆ TruffleRunner [truffle-tck](index.md) › [com.oracle.truffle.tck](com/oracle/truffle/tck/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md). Since 0.25. ```java public class TruffleRunner extends BlockJUnit4ClassRunner ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `Runner` > `ParentRunner` > `BlockJUnit4ClassRunner` > `TruffleRunner` JUnit test runner for unit testing Truffle AST interpreters. A test using [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md) consists of 2 parts, a Truffle AST to be tested, and a test method that drives the test, provides input argument values and validates the result. #### Writing a test AST The Truffle AST to be tested is written as a [`RootNode`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html) subclass, for example: ```java public class TestExecuteNode extends RootNode { @Child InteropLibrary interop; public TestExecuteNode() { super(runWithPolyglot.getTestLanguage()); interop = InteropLibrary.getFactory().createDispatched(5); } @Override public Object execute(VirtualFrame frame) { Object obj = frame.getArguments()[0]; try { return interop.execute(obj); } catch (InteropException ex) { CompilerDirectives.transferToInterpreter(); Assert.fail(ex.getMessage()); return null; } } } ``` #### Writing a test method The test method is a normal method annotated with `Test`. It may have one or more arguments of type [`CallTarget`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/CallTarget.html) that are annotated with [`Inject`](com/oracle/truffle/tck/TruffleRunner.Inject.md). The [`Inject`](com/oracle/truffle/tck/TruffleRunner.Inject.md) annotation specifies a [`RootNode`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html) subclass that is the root of a test AST, and the [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md) will create one [`CallTarget`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/CallTarget.html) for each of these test ASTs. The test method can then execute the AST by calling the [`CallTarget.call`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/CallTarget.html#call%28java.lang.Object...%29) method. Typically a test method will prepare some arguments, and then do a single call to [`CallTarget.call`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/CallTarget.html#call%28java.lang.Object...%29). Then it should verify the result by inspecting the return value and checking the expected side effects of the test code. ```java @RunWith(TruffleRunner.class) public class ExampleTest { @Test public void executeTest(@Inject(TestExecuteNode.class) CallTarget target) { TruffleObject receiver = prepareArgumentValue(); Object ret = target.call(receiver); Assert.assertEquals(expectedRetValue(), ret); } } ``` #### Running a test in the polyglot engine If a test should be run in the context of a polyglot engine, [`RunWithPolyglotRule`](com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.md) can be used. ```java @RunWith(TruffleRunner.class) public static class PolyglotTest { @ClassRule RunWithPolyglotRule runWithPolyglot = new RunWithPolyglotRule(); private static Object prepared; @BeforeClass public void prepare() { prepared = runWithPolyglot.getTruffleTestEnv().importSymbol("..."); } @Test public void executeTest(@Inject(TestExecuteNode.class) CallTarget target) { Object ret = target.call(prepared); Assert.assertEquals(expectedRetValue(), ret); } } ``` **See also** - [`warmup iterations and compilation`](com/oracle/truffle/tck/TruffleRunner.Warmup.md) - [`parameterized Truffle AST tests`](com/oracle/truffle/tck/TruffleRunner.ParametersFactory.md) ## Nested types - [`TruffleRunner.Inject`](com/oracle/truffle/tck/TruffleRunner.Inject.md) (annotation interface): A parameter annotated with Inject specifies the RootNode of the test AST. - [`TruffleRunner.ParametersFactory`](com/oracle/truffle/tck/TruffleRunner.ParametersFactory.md) (class): ParametersRunnerFactory for testing Truffle AST interpreters using Parameterized unit tests. - [`TruffleRunner.RunWithPolyglotRule`](com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.md) (class): JUnit rule to run the tests in the context of a polyglot engine. - [`TruffleRunner.Warmup`](com/oracle/truffle/tck/TruffleRunner.Warmup.md) (annotation interface): A test method can be annotated with Warmup to specify how many warmup iterations of a test should be done before the Truffle tree is compiled. ## Constructors ### TruffleRunner(Class) `public TruffleRunner(Class klass) throws InitializationError`. Since 0.25. Should not be called directly. To use this class, annotate your test class with `@RunWith(TruffleRunner.class)`. See also: `TruffleRunner`. Cite: `com/oracle/truffle/tck/TruffleRunner.html#(java.lang.Class)` ### TruffleRunner(TestClass) `public TruffleRunner(TestClass testClass) throws InitializationError`. Since 24.2. Should not be called directly. To use this class, annotate your test class with `@RunWith(TruffleRunner.class)`. See also: `TruffleRunner`. Cite: `com/oracle/truffle/tck/TruffleRunner.html#(org.junit.runners.model.TestClass)` ## Methods ### methodInvoker(FrameworkMethod, Object) `protected final Statement methodInvoker(FrameworkMethod method, Object test)`. Since 0.25. Internal method used by the JUnit framework. Do not call directly. Overrides `methodInvoker(org.junit.runners.model.FrameworkMethod,java.lang.Object)`. Cite: `com/oracle/truffle/tck/TruffleRunner.html#methodInvoker(org.junit.runners.model.FrameworkMethod,java.lang.Object)` ### validateTestMethods(List) `protected final void validateTestMethods(List errors)`. Since 0.25. Internal method used by the JUnit framework. Do not call directly. Overrides `validateTestMethods(java.util.List)`. Cite: `com/oracle/truffle/tck/TruffleRunner.html#validateTestMethods(java.util.List)` ## Inherited members - From class `BlockJUnit4ClassRunner`: `collectInitializationErrors`, `computeTestMethods`, `createTest`, `createTest`, `describeChild`, `getChildren`, `getTestRules`, `isIgnored`, `methodBlock`, `possiblyExpectingExceptions`, `rules`, `runChild`, `testName`, `validateConstructor`, `validateFields`, `validateInstanceMethods`, `validateNoNonStaticInnerClass`, `validateOnlyOneConstructor`, `validateZeroArgConstructor`, `withAfters`, `withBefores`, `withPotentialTimeout` - From class `ParentRunner`: `childrenInvoker`, `classBlock`, `classRules`, `createTestClass`, `filter`, `getDescription`, `getName`, `getRunnerAnnotations`, `getTestClass`, `order`, `run`, `runLeaf`, `setScheduler`, `sort`, `validatePublicVoidNoArgMethods`, `withAfterClasses`, `withBeforeClasses`, `withInterruptIsolation` - From class `Runner`: `testCount` - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # @ TruffleRunner.Inject [truffle-tck](index.md) › [com.oracle.truffle.tck](com/oracle/truffle/tck/index.md) · Every page: [llms.txt](llms.txt) Annotation interface in [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md). Since 0.25. Nested in [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md). ```java @Retention(RUNTIME) @Target({PARAMETER}) public @interface TruffleRunner.Inject ``` A parameter annotated with [`Inject`](com/oracle/truffle/tck/TruffleRunner.Inject.md) specifies the [`RootNode`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html) of the test AST. **See also** - [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md) ## Elements ### value() `Class value()`. Since 0.25. Defines the [`root node`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html) of the Truffle tree that should be tested. Cite: `com/oracle/truffle/tck/TruffleRunner.Inject.html#value()` # ◆ TruffleRunner.ParametersFactory [truffle-tck](index.md) › [com.oracle.truffle.tck](com/oracle/truffle/tck/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md). Since 0.25. Nested in [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md). ```java public static final class TruffleRunner.ParametersFactory implements ParametersRunnerFactory ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `ParametersFactory` Implements: `ParametersRunnerFactory` `ParametersRunnerFactory` for testing Truffle AST interpreters using `Parameterized` unit tests. To use the parameters for constructing the test AST, the test [`RootNode`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html) constructor may take the test class as single argument, or alternatively the test [`RootNode`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html) can be a non-static inner class of the test class. ```java @RunWith(Parameterized.class) @UseParametersRunnerFactory(TruffleRunner.ParametersFactory.class) public static class ParameterizedTest { @Parameters(name = "{0}, {1}") public static Collection data() { ArrayList ret = new ArrayList<>(); ret.add(new Object[]{5, "test"}); ret.add(new Object[]{-3, "asdf"}); return ret; } @Parameter(0) int intParam; @Parameter(1) String stringParam; public class TestConstArgNode extends RootNode { private final int iArg; private final String sArg; @Child InteropLibrary interop; public TestConstArgNode() { super(null); this.iArg = intParam; this.sArg = stringParam; } @Override public Object execute(VirtualFrame frame) { TruffleObject obj = (TruffleObject) frame.getArguments()[0]; try { return interop.execute(obj, iArg, sArg); } catch (InteropException ex) { CompilerDirectives.transferToInterpreter(); Assert.fail(ex.getMessage()); return null; } } } @Test public void constArg(@Inject(TestConstArgNode.class) CallTarget target) { TruffleObject arg = prepareArgumentValue(); Object ret = target.call(arg); Assert.assertEquals(expectedRetValue(), ret); } } ``` **See also** - [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md) ## Constructors ### ParametersFactory() `public ParametersFactory()`. Since 0.25. Should not be called directly. To use this class, annotate your test class with `@Parameterized.UseParametersRunnerFactory(TruffleRunner.ParametersFactory.class)`. See also: `TruffleRunner`. Cite: `com/oracle/truffle/tck/TruffleRunner.ParametersFactory.html#()` ## Methods ### createRunnerForTestWithParameters(TestWithParameters) `public Runner createRunnerForTestWithParameters(TestWithParameters test) throws InitializationError`. Since 0.25. Internal method used by the JUnit framework. Do not call directly. Overrides `createRunnerForTestWithParameters(org.junit.runners.parameterized.TestWithParameters)`. Cite: `com/oracle/truffle/tck/TruffleRunner.ParametersFactory.html#createRunnerForTestWithParameters(org.junit.runners.parameterized.TestWithParameters)` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ TruffleRunner.RunWithPolyglotRule [truffle-tck](index.md) › [com.oracle.truffle.tck](com/oracle/truffle/tck/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md). Since 0.27. Nested in [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md). ```java public static final class TruffleRunner.RunWithPolyglotRule implements TestRule ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `RunWithPolyglotRule` Implements: `TestRule` JUnit rule to run the tests in the context of a polyglot engine. This can be used as a `ClassRule` or as a `Rule`. If used as `ClassRule`, a single context is created for all unit tests in this class, and all tests (and also other methods like `BeforeClass`, `Before` `After` and `AfterClass`) are executed in this context. If used as `Rule`, a new context is created for each unit test. The `Before` and `After` actions are also executed in this context. No context is available in the `BeforeClass` and `AfterClass` methods. ## Constructors ### RunWithPolyglotRule() `public RunWithPolyglotRule()`. Since 0.27. Cite: `com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.html#()` ### RunWithPolyglotRule(Context.Builder) `public RunWithPolyglotRule(Context.Builder contextBuilder)`. Since 19.0. Parameters: `contextBuilder` `Context.Builder`: a custom context builder. Cite: `com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.html#(org.graalvm.polyglot.Context.Builder)` ## Methods ### apply(Statement, Description) `public Statement apply(Statement stmt, Description description)`. Since 0.27. Internal method used by the JUnit framework. Do not call directly. Overrides `apply(org.junit.runners.model.Statement,org.junit.runner.Description)`. Cite: `com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.html#apply(org.junit.runners.model.Statement,org.junit.runner.Description)` ### getPolyglotContext() `public Context getPolyglotContext()`. Since 0.27. Get the current `Context`. This should only be called from code that is executed by the `TruffleRunner`. In particular, this method can not be called from static initializers and constructors of test classes. Use `Before` or `BeforeClass` methods instead, or put the initialization code into the constructor of the [`RootNode`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html) of the test. Cite: `com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.html#getPolyglotContext()` ### getTruffleTestEnv() `public TruffleLanguage.Env getTruffleTestEnv()`. Since 0.27. Get an environment to access the polyglot engine using interop. This can be used to run setup tasks, and to do mock interop access into the polyglot engine. This should only be called from code that is executed by the `TruffleRunner`. In particular, this method can not be called from static initializers and constructors of test classes. Use `Before` or `BeforeClass` methods instead, or put the initialization code into the constructor of the [`RootNode`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html) of the test. Cite: `com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.html#getTruffleTestEnv()` ### getTestLanguage() `public TruffleLanguage getTestLanguage()`. Since 21.1. Get an instance of the [`TruffleLanguage`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html) that this test is running under. Nodes that are used with `Inject` should pass this instance to their super constructor. Cite: `com/oracle/truffle/tck/TruffleRunner.RunWithPolyglotRule.html#getTestLanguage()` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # @ TruffleRunner.Warmup [truffle-tck](index.md) › [com.oracle.truffle.tck](com/oracle/truffle/tck/index.md) · Every page: [llms.txt](llms.txt) Annotation interface in [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md). Since 0.25. Nested in [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md). ```java @Retention(RUNTIME) @Target({METHOD}) public @interface TruffleRunner.Warmup ``` A test method can be annotated with [`Warmup`](com/oracle/truffle/tck/TruffleRunner.Warmup.md) to specify how many warmup iterations of a test should be done before the Truffle tree is compiled. If this annotation is missing, the default value of 3 is used. ```java @Test @Warmup(5) public void warmupTest(@Inject(TestExecuteNode.class) CallTarget target) { TruffleObject receiver = prepareArgumentValue(); Object ret = target.call(receiver); Assert.assertEquals(expectedRetValue(), ret); } ``` In this example, the test code will in total be run 6 times. The first 5 iterations are warmup. The [`CallTarget.call`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/CallTarget.html#call%28java.lang.Object...%29) invocation will run in the interpreter, simply calling the [`RootNode.execute`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/nodes/RootNode.html#execute%28com.oracle.truffle.api.frame.VirtualFrame%29) method. This allows the AST to specialize itself before it is compiled. After warmup, the resulting specialized AST is compiled, and in the final iteration the [`CallTarget`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/CallTarget.html) represents the resulting compiled code. **See also** - [`TruffleRunner`](com/oracle/truffle/tck/TruffleRunner.md) ## Elements ### value() `int value()`. Since 0.25. The number of warmup iterations to run before a test is compiled. Cite: `com/oracle/truffle/tck/TruffleRunner.Warmup.html#value()` # ◆ TruffleTestInvokerTruffleTestInvokerLanguageProvider [truffle-tck](index.md) › [com.oracle.truffle.tck](com/oracle/truffle/tck/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck`](com/oracle/truffle/tck/index.md). ```java public final class TruffleTestInvokerTruffleTestInvokerLanguageProvider extends TruffleLanguageProvider ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > [`TruffleLanguageProvider`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/provider/TruffleLanguageProvider.html) > `TruffleTestInvokerTruffleTestInvokerLanguageProvider` ## Constructors ### TruffleTestInvokerTruffleTestInvokerLanguageProvider() `public TruffleTestInvokerTruffleTestInvokerLanguageProvider()`. Declared by the compiler. Creates a new TruffleTestInvokerTruffleTestInvokerLanguageProvider instance. Cite: `com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.html#()` ## Methods ### getLanguageClassName() `protected String getLanguageClassName()`. Overrides `getLanguageClassName()`. Cite: `com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.html#getLanguageClassName()` ### create() `protected Object create()`. Overrides `create()`. Cite: `com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.html#create()` ### getServicesClassNames() `protected Collection getServicesClassNames()`. Overrides `getServicesClassNames()`. Cite: `com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.html#getServicesClassNames()` ### createFileTypeDetectors() `protected List createFileTypeDetectors()`. Overrides `createFileTypeDetectors()`. Cite: `com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.html#createFileTypeDetectors()` ### getInternalResourceIds() `protected List getInternalResourceIds()`. Overrides `getInternalResourceIds()`. Cite: `com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.html#getInternalResourceIds()` ### createInternalResource(String) `protected Object createInternalResource(String resourceId)`. Overrides `createInternalResource(java.lang.String)`. Cite: `com/oracle/truffle/tck/TruffleTestInvokerTruffleTestInvokerLanguageProvider.html#createInternalResource(java.lang.String)` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ▣ com.oracle.truffle.tck.impl [truffle-tck](index.md) · Every page: [llms.txt](llms.txt) Package in truffle-tck. ## Classes - [`PolyglotEngineWithJavaScript`](com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.md): Tests with code snippets referencing JavaScript (executed only when an implementation of JavaScript is around). - [`PolyglotEngineWithR`](com/oracle/truffle/tck/impl/PolyglotEngineWithR.md): Tests with code snippets in R language (executed only when an implementation of R is around). - [`PolyglotEngineWithRuby`](com/oracle/truffle/tck/impl/PolyglotEngineWithRuby.md): Tests with code snippets referencing Ruby (executed only when implementation of Ruby is around). - [`TckLanguage`](com/oracle/truffle/tck/impl/TckLanguage.md): No description. - [`TckLanguageProvider`](com/oracle/truffle/tck/impl/TckLanguageProvider.md): No description. - [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md): No description. # ◆ PolyglotEngineWithJavaScript [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). ```java public class PolyglotEngineWithJavaScript ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `PolyglotEngineWithJavaScript` Tests with code snippets referencing JavaScript (executed only when an implementation of JavaScript is around). ## Nested types - [`PolyglotEngineWithJavaScript.Moment`](com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.Moment.md) (class): No description. ## Constructors ### PolyglotEngineWithJavaScript() `public PolyglotEngineWithJavaScript()`. Declared by the compiler. Creates a new PolyglotEngineWithJavaScript instance. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#()` ## Methods ### initEngine() `public void initEngine()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#initEngine()` ### disposeEngine() `public void disposeEngine()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#disposeEngine()` ### testCallJavaScriptFunctionFromJava() `public void testCallJavaScriptFunctionFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#testCallJavaScriptFunctionFromJava()` ### callJavaScriptFunctionFromJava() `public void callJavaScriptFunctionFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#callJavaScriptFunctionFromJava()` ### testCallJavaScriptFunctionsWithSharedStateFromJava() `public void testCallJavaScriptFunctionsWithSharedStateFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#testCallJavaScriptFunctionsWithSharedStateFromJava()` ### callJavaScriptFunctionsWithSharedStateFromJava() `public void callJavaScriptFunctionsWithSharedStateFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#callJavaScriptFunctionsWithSharedStateFromJava()` ### testAccessFieldsOfJavaObject() `public void testAccessFieldsOfJavaObject()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#testAccessFieldsOfJavaObject()` ### testAccessFieldsOfJavaObjectWithConverter() `public void testAccessFieldsOfJavaObjectWithConverter()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#testAccessFieldsOfJavaObjectWithConverter()` ### accessFieldsOfJavaObject() `public void accessFieldsOfJavaObject()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#accessFieldsOfJavaObject()` ### accessFieldsOfJavaObjectWithConverter() `public void accessFieldsOfJavaObjectWithConverter()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#accessFieldsOfJavaObjectWithConverter()` ### testCreateJavaScriptFactoryForJavaClass() `public void testCreateJavaScriptFactoryForJavaClass()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#testCreateJavaScriptFactoryForJavaClass()` ### createJavaScriptFactoryForJavaClass() `public void createJavaScriptFactoryForJavaClass()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#createJavaScriptFactoryForJavaClass()` ### testCallJavaScriptClassFactoryFromJava() `public void testCallJavaScriptClassFactoryFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#testCallJavaScriptClassFactoryFromJava()` ### callJavaScriptClassFactoryFromJava() `public void callJavaScriptClassFactoryFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#callJavaScriptClassFactoryFromJava()` ### testAccessJavaScriptArrayWithTypedElementsFromJava() `public void testAccessJavaScriptArrayWithTypedElementsFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#testAccessJavaScriptArrayWithTypedElementsFromJava()` ### accessJavaScriptArrayWithTypedElementsFromJava() `public void accessJavaScriptArrayWithTypedElementsFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#accessJavaScriptArrayWithTypedElementsFromJava()` ### tetsAccessJSONObjectProperties() `public void tetsAccessJSONObjectProperties()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#tetsAccessJSONObjectProperties()` ### accessJavaScriptJSONObjectFromJava() `public void accessJavaScriptJSONObjectFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.html#accessJavaScriptJSONObjectFromJava()` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ PolyglotEngineWithJavaScript.Moment [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). Nested in [`PolyglotEngineWithJavaScript`](com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.md). ```java public static final class PolyglotEngineWithJavaScript.Moment ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `Moment` ## Fields ### hours `public final int hours`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.Moment.html#hours` ### minutes `public final int minutes`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.Moment.html#minutes` ### seconds `public final int seconds`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.Moment.html#seconds` ## Constructors ### Moment(int, int, int) `public Moment(int hours, int minutes, int seconds)`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithJavaScript.Moment.html#(int,int,int)` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ PolyglotEngineWithR [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). ```java public class PolyglotEngineWithR ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `PolyglotEngineWithR` Tests with code snippets in R language (executed only when an implementation of R is around). ## Constructors ### PolyglotEngineWithR() `public PolyglotEngineWithR()`. Declared by the compiler. Creates a new PolyglotEngineWithR instance. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithR.html#()` ## Methods ### initEngine() `public void initEngine()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithR.html#initEngine()` ### disposeEngine() `public void disposeEngine()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithR.html#disposeEngine()` ### testCallRtFunctionFromJava() `public void testCallRtFunctionFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithR.html#testCallRtFunctionFromJava()` ### callRFunctionFromJava() `public void callRFunctionFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithR.html#callRFunctionFromJava()` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ PolyglotEngineWithRuby [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). ```java public class PolyglotEngineWithRuby ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `PolyglotEngineWithRuby` Tests with code snippets referencing Ruby (executed only when implementation of Ruby is around). ## Constructors ### PolyglotEngineWithRuby() `public PolyglotEngineWithRuby()`. Declared by the compiler. Creates a new PolyglotEngineWithRuby instance. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithRuby.html#()` ## Methods ### initEngine() `public void initEngine()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithRuby.html#initEngine()` ### disposeEngine() `public void disposeEngine()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithRuby.html#disposeEngine()` ### testCallRubyFunctionFromJava() `public void testCallRubyFunctionFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithRuby.html#testCallRubyFunctionFromJava()` ### callRubyFunctionFromJava() `public void callRubyFunctionFromJava()`. Cite: `com/oracle/truffle/tck/impl/PolyglotEngineWithRuby.html#callRubyFunctionFromJava()` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ TckLanguage [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). ```java public final class TckLanguage extends TruffleLanguage ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > [`TruffleLanguage`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html) > `TckLanguage` ## Constructors ### TckLanguage() `public TckLanguage()`. Declared by the compiler. Creates a new TckLanguage instance. Cite: `com/oracle/truffle/tck/impl/TckLanguage.html#()` ## Methods ### createContext(TruffleLanguage.Env) `protected TruffleLanguage.Env createContext(TruffleLanguage.Env env)`. Overrides `createContext(com.oracle.truffle.api.TruffleLanguage.Env)`. Cite: `com/oracle/truffle/tck/impl/TckLanguage.html#createContext(com.oracle.truffle.api.TruffleLanguage.Env)` ### parse(TruffleLanguage.ParsingRequest) `protected CallTarget parse(TruffleLanguage.ParsingRequest request) throws Exception`. Overrides `parse(com.oracle.truffle.api.TruffleLanguage.ParsingRequest)`. Cite: `com/oracle/truffle/tck/impl/TckLanguage.html#parse(com.oracle.truffle.api.TruffleLanguage.ParsingRequest)` ### expectNumber(Object) `public static Number expectNumber(Object o)`. Cite: `com/oracle/truffle/tck/impl/TckLanguage.html#expectNumber(java.lang.Object)` ### expectString(Object) `public static String expectString(Object o)`. Cite: `com/oracle/truffle/tck/impl/TckLanguage.html#expectString(java.lang.Object)` ### expectTruffleObject(Object) `public static TruffleObject expectTruffleObject(Object o)`. Cite: `com/oracle/truffle/tck/impl/TckLanguage.html#expectTruffleObject(java.lang.Object)` ### checkBounds(int, int) `public static int checkBounds(int idx, int size)`. Cite: `com/oracle/truffle/tck/impl/TckLanguage.html#checkBounds(int,int)` ## Inherited members - From class [`TruffleLanguage`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html): [`areOptionsCompatible`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#areOptionsCompatible%28org.graalvm.options.OptionValues,org.graalvm.options.OptionValues%29), [`createContextLocal`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#createContextLocal%28com.oracle.truffle.api.TruffleLanguage.ContextLocalFactory%29), [`createContextThreadLocal`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#createContextThreadLocal%28com.oracle.truffle.api.TruffleLanguage.ContextThreadLocalFactory%29), [`disposeContext`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#disposeContext%28C%29), [`disposeThread`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#disposeThread%28C,java.lang.Thread%29), [`exitContext`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#exitContext%28C,com.oracle.truffle.api.TruffleLanguage.ExitMode,int%29), [`finalizeContext`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#finalizeContext%28C%29), [`finalizeThread`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#finalizeThread%28C,java.lang.Thread%29), [`getAsynchronousStackDepth`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#getAsynchronousStackDepth%28%29), [`getLanguageHome`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#getLanguageHome%28%29), [`getLanguageView`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#getLanguageView%28C,java.lang.Object%29), [`getOptionDescriptors`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#getOptionDescriptors%28%29), [`getScope`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#getScope%28C%29), [`getSourceOptionDescriptors`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#getSourceOptionDescriptors%28%29), [`initializeContext`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#initializeContext%28C%29), [`initializeMultiThreading`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#initializeMultiThreading%28C%29), [`initializeMultipleContexts`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#initializeMultipleContexts%28%29), [`initializeThread`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#initializeThread%28C,java.lang.Thread%29), [`isThreadAccessAllowed`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#isThreadAccessAllowed%28java.lang.Thread,boolean%29), [`isVisible`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#isVisible%28C,java.lang.Object%29), [`locals`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#locals), [`parse`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#parse%28com.oracle.truffle.api.TruffleLanguage.InlineParsingRequest%29), [`patchContext`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/TruffleLanguage.html#patchContext%28C,com.oracle.truffle.api.TruffleLanguage.Env%29) - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ TckLanguageProvider [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). ```java public final class TckLanguageProvider extends TruffleLanguageProvider ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > [`TruffleLanguageProvider`](https://graalvm.elide.help/25.6.0-elide.4/api/truffle-api/com/oracle/truffle/api/provider/TruffleLanguageProvider.html) > `TckLanguageProvider` ## Constructors ### TckLanguageProvider() `public TckLanguageProvider()`. Declared by the compiler. Creates a new TckLanguageProvider instance. Cite: `com/oracle/truffle/tck/impl/TckLanguageProvider.html#()` ## Methods ### getLanguageClassName() `protected String getLanguageClassName()`. Overrides `getLanguageClassName()`. Cite: `com/oracle/truffle/tck/impl/TckLanguageProvider.html#getLanguageClassName()` ### create() `protected Object create()`. Overrides `create()`. Cite: `com/oracle/truffle/tck/impl/TckLanguageProvider.html#create()` ### getServicesClassNames() `protected Collection getServicesClassNames()`. Overrides `getServicesClassNames()`. Cite: `com/oracle/truffle/tck/impl/TckLanguageProvider.html#getServicesClassNames()` ### createFileTypeDetectors() `protected List createFileTypeDetectors()`. Overrides `createFileTypeDetectors()`. Cite: `com/oracle/truffle/tck/impl/TckLanguageProvider.html#createFileTypeDetectors()` ### getInternalResourceIds() `protected List getInternalResourceIds()`. Overrides `getInternalResourceIds()`. Cite: `com/oracle/truffle/tck/impl/TckLanguageProvider.html#getInternalResourceIds()` ### createInternalResource(String) `protected Object createInternalResource(String resourceId)`. Overrides `createInternalResource(java.lang.String)`. Cite: `com/oracle/truffle/tck/impl/TckLanguageProvider.html#createInternalResource(java.lang.String)` ## Inherited members - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ TruffleLanguageRunner [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Abstract class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). ```java public abstract class TruffleLanguageRunner extends BlockJUnit4ClassRunner ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `Runner` > `ParentRunner` > `BlockJUnit4ClassRunner` > `TruffleLanguageRunner` ## Nested types - [`TruffleLanguageRunner.JavaScriptRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.JavaScriptRunner.md) (class): No description. - [`TruffleLanguageRunner.RRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.RRunner.md) (class): No description. - [`TruffleLanguageRunner.RubyRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.RubyRunner.md) (class): No description. ## Methods ### runChild(FrameworkMethod, RunNotifier) `protected void runChild(FrameworkMethod method, RunNotifier notifier)`. Overrides `runChild(org.junit.runners.model.FrameworkMethod,org.junit.runner.notification.RunNotifier)`. Cite: `com/oracle/truffle/tck/impl/TruffleLanguageRunner.html#runChild(org.junit.runners.model.FrameworkMethod,org.junit.runner.notification.RunNotifier)` ## Inherited members - From class `BlockJUnit4ClassRunner`: `collectInitializationErrors`, `computeTestMethods`, `createTest`, `createTest`, `describeChild`, `getChildren`, `getTestRules`, `isIgnored`, `methodBlock`, `methodInvoker`, `possiblyExpectingExceptions`, `rules`, `testName`, `validateConstructor`, `validateFields`, `validateInstanceMethods`, `validateNoNonStaticInnerClass`, `validateOnlyOneConstructor`, `validateTestMethods`, `validateZeroArgConstructor`, `withAfters`, `withBefores`, `withPotentialTimeout` - From class `ParentRunner`: `childrenInvoker`, `classBlock`, `classRules`, `createTestClass`, `filter`, `getDescription`, `getName`, `getRunnerAnnotations`, `getTestClass`, `order`, `run`, `runLeaf`, `setScheduler`, `sort`, `validatePublicVoidNoArgMethods`, `withAfterClasses`, `withBeforeClasses`, `withInterruptIsolation` - From class `Runner`: `testCount` - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ TruffleLanguageRunner.JavaScriptRunner [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). Nested in [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md). ```java public static final class TruffleLanguageRunner.JavaScriptRunner extends TruffleLanguageRunner ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `Runner` > `ParentRunner` > `BlockJUnit4ClassRunner` > [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md) > `JavaScriptRunner` ## Constructors ### JavaScriptRunner(Class) `public JavaScriptRunner(Class klass) throws InitializationError`. Cite: `com/oracle/truffle/tck/impl/TruffleLanguageRunner.JavaScriptRunner.html#(java.lang.Class)` ## Inherited members - From class [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md): [`runChild`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md#runChild%28org.junit.runners.model.FrameworkMethod,org.junit.runner.notification.RunNotifier%29) - From class `BlockJUnit4ClassRunner`: `collectInitializationErrors`, `computeTestMethods`, `createTest`, `createTest`, `describeChild`, `getChildren`, `getTestRules`, `isIgnored`, `methodBlock`, `methodInvoker`, `possiblyExpectingExceptions`, `rules`, `testName`, `validateConstructor`, `validateFields`, `validateInstanceMethods`, `validateNoNonStaticInnerClass`, `validateOnlyOneConstructor`, `validateTestMethods`, `validateZeroArgConstructor`, `withAfters`, `withBefores`, `withPotentialTimeout` - From class `ParentRunner`: `childrenInvoker`, `classBlock`, `classRules`, `createTestClass`, `filter`, `getDescription`, `getName`, `getRunnerAnnotations`, `getTestClass`, `order`, `run`, `runLeaf`, `setScheduler`, `sort`, `validatePublicVoidNoArgMethods`, `withAfterClasses`, `withBeforeClasses`, `withInterruptIsolation` - From class `Runner`: `testCount` - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ TruffleLanguageRunner.RRunner [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). Nested in [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md). ```java public static final class TruffleLanguageRunner.RRunner extends TruffleLanguageRunner ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `Runner` > `ParentRunner` > `BlockJUnit4ClassRunner` > [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md) > `RRunner` ## Constructors ### RRunner(Class) `public RRunner(Class klass) throws InitializationError`. Cite: `com/oracle/truffle/tck/impl/TruffleLanguageRunner.RRunner.html#(java.lang.Class)` ## Inherited members - From class [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md): [`runChild`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md#runChild%28org.junit.runners.model.FrameworkMethod,org.junit.runner.notification.RunNotifier%29) - From class `BlockJUnit4ClassRunner`: `collectInitializationErrors`, `computeTestMethods`, `createTest`, `createTest`, `describeChild`, `getChildren`, `getTestRules`, `isIgnored`, `methodBlock`, `methodInvoker`, `possiblyExpectingExceptions`, `rules`, `testName`, `validateConstructor`, `validateFields`, `validateInstanceMethods`, `validateNoNonStaticInnerClass`, `validateOnlyOneConstructor`, `validateTestMethods`, `validateZeroArgConstructor`, `withAfters`, `withBefores`, `withPotentialTimeout` - From class `ParentRunner`: `childrenInvoker`, `classBlock`, `classRules`, `createTestClass`, `filter`, `getDescription`, `getName`, `getRunnerAnnotations`, `getTestClass`, `order`, `run`, `runLeaf`, `setScheduler`, `sort`, `validatePublicVoidNoArgMethods`, `withAfterClasses`, `withBeforeClasses`, `withInterruptIsolation` - From class `Runner`: `testCount` - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29) # ◆ TruffleLanguageRunner.RubyRunner [truffle-tck](index.md) › [com.oracle.truffle.tck.impl](com/oracle/truffle/tck/impl/index.md) · Every page: [llms.txt](llms.txt) Class in [`com.oracle.truffle.tck.impl`](com/oracle/truffle/tck/impl/index.md). Nested in [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md). ```java public static final class TruffleLanguageRunner.RubyRunner extends TruffleLanguageRunner ``` Inheritance: [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html) > `Runner` > `ParentRunner` > `BlockJUnit4ClassRunner` > [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md) > `RubyRunner` ## Constructors ### RubyRunner(Class) `public RubyRunner(Class klass) throws InitializationError`. Cite: `com/oracle/truffle/tck/impl/TruffleLanguageRunner.RubyRunner.html#(java.lang.Class)` ## Inherited members - From class [`TruffleLanguageRunner`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md): [`runChild`](com/oracle/truffle/tck/impl/TruffleLanguageRunner.md#runChild%28org.junit.runners.model.FrameworkMethod,org.junit.runner.notification.RunNotifier%29) - From class `BlockJUnit4ClassRunner`: `collectInitializationErrors`, `computeTestMethods`, `createTest`, `createTest`, `describeChild`, `getChildren`, `getTestRules`, `isIgnored`, `methodBlock`, `methodInvoker`, `possiblyExpectingExceptions`, `rules`, `testName`, `validateConstructor`, `validateFields`, `validateInstanceMethods`, `validateNoNonStaticInnerClass`, `validateOnlyOneConstructor`, `validateTestMethods`, `validateZeroArgConstructor`, `withAfters`, `withBefores`, `withPotentialTimeout` - From class `ParentRunner`: `childrenInvoker`, `classBlock`, `classRules`, `createTestClass`, `filter`, `getDescription`, `getName`, `getRunnerAnnotations`, `getTestClass`, `order`, `run`, `runLeaf`, `setScheduler`, `sort`, `validatePublicVoidNoArgMethods`, `withAfterClasses`, `withBeforeClasses`, `withInterruptIsolation` - From class `Runner`: `testCount` - From class [`Object`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html): [`clone`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#clone%28%29), [`equals`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals%28java.lang.Object%29), [`finalize`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#finalize%28%29), [`getClass`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass%28%29), [`hashCode`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode%28%29), [`notify`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify%28%29), [`notifyAll`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll%28%29), [`toString`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long%29), [`wait`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait%28long,int%29)