native test framework
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user