hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 7af19b289ed4422e2a66903d827bf0becf4b5c9b
parent 8af679b0e9ae7f7a91d73bf19975dad50c1d0054
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sun, 10 Apr 2022 16:13:00 -0400

parse: test returned unparse size in roundtrip

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mhare/parse/+test/roundtrip.ha | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hare/parse/+test/roundtrip.ha b/hare/parse/+test/roundtrip.ha @@ -29,8 +29,9 @@ fn roundtrip(src: str) void = { defer ast::subunit_free(u); let out = strio::dynamic(); defer io::close(&out); - unparse::subunit(&out, u) as size; + let z = unparse::subunit(&out, u) as size; let unsrc = strio::string(&out); + assert(z == len(unsrc)); if (unsrc != src) { fmt::errorfln("=== wanted\n{}", src)!; fmt::errorfln("=== got\n{}", unsrc)!;