ASS_CODE :: #code { log_error("\n%: Test failed", loc); log_error("-------------------"); log_error(":Subject A\n%\n\n", a); log_error(":Subject B\n%\n\n", b); `return false; } ass :: (comp: bool, loc := #caller_location) #expand { if !comp { log_error("\n%: Test failed", loc); `return false; } } ass :: (a: $T, b: T, $code := ASS_CODE, loc := #caller_location) #expand { if a != b { #insert,scope() code; } } /** Cannot use `[]$T, []T` here, because Jai cannot resolve the overloads then */ ass :: (a: []int, b: []int, $code := ASS_CODE, loc := #caller_location) #expand { if a.count != b.count { #insert,scope() code; } for a if it != b[it_index] { #insert,scope() code; } } #scope_file using,only(log_error) Basic :: #import "Basic";