Expand description
ternlang-test — test framework for .tern programs.
Runs source strings through the full pipeline (parse → stdlib resolve → semantic check → codegen → BET VM) and asserts on the outcome.
§Quick start
assert_tern!(TernTestCase {
name: "hold is the zero state",
source: "fn main() -> trit { return 0; }",
expected: TernExpected::Trit(0),
});Macros§
- assert_
tern - Run a
TernTestCaseand panic with a readable message if it fails.
Structs§
- Tern
Test Case - A single ternlang test case.
- Tern
Test Result - Outcome of running a
TernTestCase.
Enums§
- Tern
Expected - What a test expects as its outcome.
Functions§
- run_
tern_ test - Run a single test case through the complete ternlang pipeline and return a result indicating pass/fail with a diagnostic message.