From 392f0c4be0d4c034a4b161337f8f3c5fbf46358a Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Mon, 4 Aug 2025 23:12:39 +0200 Subject: add a little test runner --- tests/recurse.hgn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/recurse.hgn (limited to 'tests/recurse.hgn') diff --git a/tests/recurse.hgn b/tests/recurse.hgn new file mode 100644 index 0000000..bf9a0fd --- /dev/null +++ b/tests/recurse.hgn @@ -0,0 +1,11 @@ +main := proc() { + print_up_to(read_int(0)) + exit(0) +} + +print_up_to := proc(n) { + print(n) + if n > 0 { + print_up_to(n - 1) + } +} -- cgit v1.2.3