Interface TestExecutor
- All Known Implementing Classes:
JvmTestExecutor, NativeTestExecutor
interface TestExecutor
Abstraction for executing compiled EK9 test programs.
Implementations handle different target architectures:
JvmTestExecutor- executes JVM bytecode in-processNativeTestExecutor- spawns native binaries as subprocesses
This abstraction enables the same test runner to work with both JVM and LLVM backends without modification.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordResult of executing a test program. -
Method Summary
Modifier and TypeMethodDescriptionexecute(TestProgram test) Execute a test program and capture its output.default TestExecutor.ExecutionResultexecute(TestProgram test, List<String> arguments) Execute a test program with command line arguments.default voidLoad all compiled classes for coverage registration.
-
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
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 executearguments- 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.
-