From 8bafe71f17eb8b56f57de736f4eac9ec8bf5b40b Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 14 May 2024 00:30:57 -0400 Subject: Add nested indentation for doctests that recursively invoke other doctests while evaluating --- builtins/functions.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'builtins/functions.h') diff --git a/builtins/functions.h b/builtins/functions.h index ed63ec36..f1a2867e 100644 --- a/builtins/functions.h +++ b/builtins/functions.h @@ -13,7 +13,11 @@ extern const char *TOMO_HASH_VECTOR; void fail(CORD fmt, ...); void fail_source(const char *filename, int64_t start, int64_t end, CORD fmt, ...); CORD builtin_last_err(); -void test(void *expr, const TypeInfo *type, CORD expected, const char *filename, int64_t start, int64_t end); +void start_test(const char *filename, int64_t start, int64_t end); +void end_test(void *expr, const TypeInfo *type, CORD expected, const char *filename, int64_t start, int64_t end); +#define test(expr, type, expected, filename, start, end) {\ + start_test(filename, start, end); \ + end_test(expr, type, expected, filename, start, end); } void say(CORD text); uint32_t generic_hash(const void *obj, const TypeInfo *type); -- cgit v1.2.3