native test framework

This commit is contained in:
2026-07-17 22:36:17 +02:00
parent cedc63b28b
commit b09787029d
23 changed files with 141197 additions and 139688 deletions
+10
View File
@@ -897,6 +897,16 @@
- `tag!` reads or folds a tagged union discriminant, while `tagname!` turns a comptime-known enum
value into its immutable field-name string
41. native test framework (implemented; v1)
- `name test { ... }` declares an implicit `void ! testing.Error` test omitted from executable builds
- anonymous `test import` edges discover dependency tests transitively; ordinary imports remain
separate namespaces and never discover tests
- direct `@std/testing` `expect` and expected-first `expect_equal` calls inject their source locations
- `brolang test` reuses `build.bro`, runs tests sequentially, continues after assertion failures,
prints a summary, and returns failure when a test fails or traps
- filtering, skipping, fixtures, snapshots, parallelism, isolation, allocators, and more assertion
families remain deferred
## A word on unchecked casts
For casts that bypass safety checks, Honey provides builtin functions: