Files
mesh/testing_test.zi
T
waozi 9859f1d1b6 Add LAN-only apps, node-local blobs and an embeddable node core
Apps can be registered as LAN-only with their allowed networks and
registration node, and a node can limit which accounts it syncs. Private
immutable ciphertext blobs stay on their node and are served over HTTP;
mesh exports carry only records. The node core can be embedded by an app
whose host supplies storage, transport and supervision. The OpenAPI
docs, mesh policy and tests follow, and the Wrangler cache is ignored.

This is the orphaned work from 2026-10-08; it builds and the Go tests
pass.
2026-10-10 20:28:35 -03:00

54 lines
1.7 KiB
Ziran

#import "std/go_types"
native :: #system_library "go:testing";
format :: #system_library "go:fmt";
Test :: #type #foreign native "T";
Fuzzer :: #type #foreign native "F";
TestCase :: #type (test: *Test) -> void;
StringFuzzCase :: #type (test: *Test, value: string) -> void;
#scope_file
HelperRaw :: (test: *Test) #foreign native "(*T).Helper";
FatalRaw :: (test: *Test, message: string) #foreign native "(*T).Fatal";
RenderRaw :: (pattern: string, arguments: []Any) -> string #go_variadic #foreign format "Sprintf";
RunRaw :: (test: *Test, name: string, callback: TestCase) -> bool #foreign native "(*T).Run";
SetenvRaw :: (test: *Test, key: string, value: string) #foreign native "(*T).Setenv";
TempDirRaw :: (test: *Test) -> string #foreign native "(*T).TempDir";
AddStringRaw :: (test: *Fuzzer, value: string) #foreign native "(*F).Add";
FuzzStringRaw :: (test: *Fuzzer, callback: StringFuzzCase) #foreign native "(*F).Fuzz";
#scope_export
Fatal :: (test: *Test, message: string) {
HelperRaw(test)
FatalRaw(test, message)
}
Fatalf :: (test: *Test, format: string, arguments: []Any) {
HelperRaw(test)
message := RenderRaw(format, arguments)
FatalRaw(test, message)
}
Run :: (test: *Test, name: string, callback: TestCase) -> bool {
HelperRaw(test)
return RunRaw(test, name, callback)
}
Setenv :: (test: *Test, key: string, value: string) {
HelperRaw(test)
SetenvRaw(test, key, value)
}
TempDir :: (test: *Test) -> string {
HelperRaw(test)
return TempDirRaw(test)
}
AddString :: (test: *Fuzzer, value: string) {
AddStringRaw(test, value)
}
FuzzString :: (test: *Fuzzer, callback: StringFuzzCase) {
FuzzStringRaw(test, callback)
}