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
# use ;
#
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.
# use ternlang_test::{TernTestCase, TernExpected, assert_tern};
# fn main() {
assert_tern!(TernTestCase {
name: "hold is the zero state",
source: "fn main() -> trit { return 0; }",
expected: TernExpected::Trit(0),
});
# }