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§
- Test
Context - Test context that tracks assertion results
- Test
Failure - A single test failure with context
Enums§
- Failure
Kind - Discriminator for how a failure should be rendered. The string-eq
path needs a multi-line block (escaped values, byte counts, first
differing offset); other failures keep the historical single-line
expected E, got Ashape.
Functions§
- format_
failure_ detail - Render a single failure as one or more indented detail lines,
terminated by a final newline. The result is always whitespace-prefixed
on every line so the runner’s
collect_failure_blockattaches it to the preceding... FAILEDheader. - 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
- patch_
seq_ ⚠test_ set_ line - Announce the source line of the next
test.assert*call. - patch_
seq_ ⚠test_ set_ name - Set the current test’s display name without touching any other state.