Module test

Module test 

Source
Expand description

Test framework support for Seq

Provides assertion primitives and test context management for the seqc test runner. Assertions collect failures instead of panicking, allowing all tests to run and report comprehensive results.

These functions are exported with C ABI for LLVM codegen to call.

Structs§

TestContext
Test context that tracks assertion results
TestFailure
A single test failure with context

Functions§

patch_seq_test_assert
Assert that a value is truthy (non-zero)
patch_seq_test_assert_eq
Assert that two integers are equal
patch_seq_test_assert_eq_str
Assert that two strings are equal
patch_seq_test_assert_not
Assert that a value is falsy (zero)
patch_seq_test_fail
Explicitly fail a test with a message
patch_seq_test_fail_count
Get the number of failed assertions
patch_seq_test_finish
Finalize test and print results
patch_seq_test_has_failures
Check if any assertions failed
patch_seq_test_init
Initialize test context for a new test
patch_seq_test_pass_count
Get the number of passed assertions