diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-09 16:27:54 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-09 16:27:54 -0500 |
| commit | 898bee15817573b5ab865a1dae7e52da310affa8 (patch) | |
| tree | b8531a828190997a63a1e1ef32f4aa568304e61c /stdlib/stdlib.c | |
| parent | 7a4f2e73addf6dfcde2a6b17b62b961608e556a0 (diff) | |
Introduce a `Match` struct to represent pattern matching results, which
improves the usability of a lot of the APIs. Also bugfix some issues
with ranges.
Diffstat (limited to 'stdlib/stdlib.c')
| -rw-r--r-- | stdlib/stdlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index eb285316..5dac3d3a 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -451,8 +451,8 @@ public void end_test(const void *expr, const TypeInfo_t *type, const char *expec Text_t expr_plain = USE_COLOR ? generic_as_text(expr, false, type) : expr_text; bool success = Text$equal(&expr_plain, &expected_text); if (!success) { - Int_t colon = Text$find(expected_text, Text(":"), I_small(1)); - if (colon.small != I_small(0).small) { + OptionalMatch_t colon = Text$find(expected_text, Text(":"), I_small(1)); + if (colon.index.small) { Text_t with_type = Text$concat(expr_plain, Text(" : "), type_name); success = Text$equal(&with_type, &expected_text); } |
