diff options
author | EuAndreh <eu@euandre.org> | 2025-05-16 05:14:03 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-05-16 05:14:03 -0300 |
commit | bc682800eb4bc77b4e63a0cc84e69bf2b41cb624 (patch) | |
tree | 5e5d90fb8a85a78929280f9f26655a00cf541936 | |
parent | src/gobang.go: Sort imports (diff) | |
download | gobang-bc682800eb4bc77b4e63a0cc84e69bf2b41cb624.tar.gz gobang-bc682800eb4bc77b4e63a0cc84e69bf2b41cb624.tar.xz |
tests/fuzz/heredoc/gobang.go: Add invariant property to the test
Diffstat (limited to '')
-rw-r--r-- | tests/fuzz/heredoc/gobang.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/fuzz/heredoc/gobang.go b/tests/fuzz/heredoc/gobang.go index e4cb9c6..c685391 100644 --- a/tests/fuzz/heredoc/gobang.go +++ b/tests/fuzz/heredoc/gobang.go @@ -10,7 +10,11 @@ import ( func fn(f *testing.F) { f.Fuzz(func(t *testing.T, s string) { - Heredoc(s) + out := Heredoc(s) + trimmedOut := out[:len(out) - 1] + if len(trimmedOut) > len(s) { + t.Errorf("bad length: %v, %v", len(trimmedOut), len(s)) + } }) } |