This is the only use of the testcase str. I think you can remove it from
the fn args and make it a comment, so
tokenize_test(&tokenize, "simple case", [1, 2, 0, 3, 4], [0], [
becomes
// simple case
tokenize_test(&tokenize, [1, 2, 0, 3, 4], [0], [
.
if (n >= iters) {
return tok;
};
- assert(peek_token(&tok) is done, testcase);- assert(next_token(&tok) is done, testcase);+ assert(peek_token(&tok) is done);+ assert(next_token(&tok) is done); return tok;
};
diff --git a/strings/tokenize.ha b/strings/tokenize.ha
index 03b76f77..3e4a4eac 100644
--- a/strings/tokenize.ha+++ b/strings/tokenize.ha
@@ -95,16 +95,16 @@ fn tokenize_test(
const p = peek_token(&tok) as str;
const n = next_token(&tok) as str;
- assert(p == n, testcase);- assert(n == want, testcase);+ assert(p == n);+ assert(n == want); };
if (n >= iters) {
return tok;
};
- assert(peek_token(&tok) is done, testcase);- assert(next_token(&tok) is done, testcase);+ assert(peek_token(&tok) is done);+ assert(next_token(&tok) is done); return tok;
};
--
2.47.1