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
+25 -2
View File
@@ -364,7 +364,30 @@ main func() void {
(expression
(sink))
(expression
(identifier))))))))))
(identifier))))))))))
==================
Native tests
==================
math :: import "../math"
test import "../math"
addition test {}
---
(source_file
(import_declaration
(identifier)
(string
(string_content)))
(test_import_declaration
(string
(string_content)))
(test_declaration
(identifier)
(block)))
==================
Expanded match arms
@@ -373,7 +396,7 @@ Expanded match arms
Kind :: enum { one, two }
Value :: union(enum) { number i32, empty void }
test func(kind Kind, value Value) void {
visit func(kind Kind, value Value) void {
match kind {
.one: {}
expand |tag|: _ = tag