Interface TestExecutor

All Known Implementing Classes:
JvmTestExecutor, NativeTestExecutor

interface TestExecutor
Abstraction for executing compiled EK9 test programs.

Implementations handle different target architectures:

This abstraction enables the same test runner to work with both JVM and LLVM backends without modification.

  • Method Details

    • execute

      Execute a test program and capture its output.
      Parameters:
      test - The test program to execute
      Returns:
      Execution result with captured output and status
    • execute

      default TestExecutor.ExecutionResult execute(TestProgram test, List<String> arguments)
      Execute a test program with command line arguments.

      Used for parameterized black-box tests where arguments are read from commandline_arg_*.txt files.

      Parameters:
      test - The test program to execute
      arguments - Command line arguments to pass
      Returns:
      Execution result with captured output and status
    • loadAllClassesForCoverage

      default void loadAllClassesForCoverage()
      Load all compiled classes for coverage registration.

      For JVM backend, this loads all .class files in the bytecode directory, triggering static initializers which register coverage probes with CoverageRuntime. This ensures ALL code (even unreferenced) appears in coverage reports.

      For native backends, this is a no-op since all code is compiled into the executable.