aboutsummaryrefslogtreecommitdiff
path: root/builtins/functions.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-14 00:30:57 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-14 00:30:57 -0400
commit8bafe71f17eb8b56f57de736f4eac9ec8bf5b40b (patch)
treef8d61433c13b6a1ee0bc979e30ef6a1a8e38df6e /builtins/functions.h
parente6297323ba3c5e90201df26c62573a7a5e367df6 (diff)
Add nested indentation for doctests that recursively invoke other
doctests while evaluating
Diffstat (limited to 'builtins/functions.h')
-rw-r--r--builtins/functions.h6
1 files changed, 5 insertions, 1 deletions
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);