diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 20:07:04 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 20:07:04 -0500 |
| commit | b34c5c57740bd819551d74554533931e89d3caf0 (patch) | |
| tree | cee3e3a2b0f75390cef2799ae5c5f41124898ab5 /builtins | |
| parent | f521a99d003c7f416a5573e975aa0657c027e470 (diff) | |
Fix up doctests
Diffstat (limited to 'builtins')
| -rw-r--r-- | builtins/functions.c | 4 | ||||
| -rw-r--r-- | builtins/functions.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/builtins/functions.c b/builtins/functions.c index 03dfe738..309ad2ab 100644 --- a/builtins/functions.c +++ b/builtins/functions.c @@ -121,7 +121,7 @@ static inline char *without_colors(const char *str) return buf; } -public void __doctest(CORD label, void *expr, TypeInfo *type, CORD expected, const char *filename, int start, int end) +public void __doctest(void *expr, TypeInfo *type, CORD expected, const char *filename, int start, int end) { static file_t *file = NULL; if (filename && (file == NULL || strcmp(file->filename, filename) != 0)) @@ -134,7 +134,7 @@ public void __doctest(CORD label, void *expr, TypeInfo *type, CORD expected, con CORD expr_str = generic_as_str(expr, USE_COLOR, type); CORD type_name = generic_as_str(NULL, false, type); - CORD_fprintf(stderr, USE_COLOR ? "\x1b[2m%r\x1b[0m %r \x1b[2m: %r\x1b[m\n" : "%r %r : %r\n", label, expr_str, type_name); + CORD_fprintf(stderr, USE_COLOR ? "\x1b[2m=\x1b[0m %r \x1b[2m: %r\x1b[m\n" : "= %r : %r\n", expr_str, type_name); if (expected) { CORD expr_plain = USE_COLOR ? generic_as_str(expr, false, type) : expr_str; bool success = (CORD_cmp(expr_str, expected) == 0); diff --git a/builtins/functions.h b/builtins/functions.h index 133c76fc..bb8b563b 100644 --- a/builtins/functions.h +++ b/builtins/functions.h @@ -10,7 +10,7 @@ extern const char *SSS_HASH_VECTOR; void fail(CORD fmt, ...); CORD builtin_last_err(); -void __doctest(CORD label, void *expr, TypeInfo *type, CORD expected, const char *filename, int start, int end); +void __doctest(void *expr, TypeInfo *type, CORD expected, const char *filename, int start, int end); uint32_t generic_hash(const void *obj, const TypeInfo *type); int32_t generic_compare(const void *x, const void *y, const TypeInfo *type); |
