From 25aa655e5b9464e291d542081ed1cf0f8fd666af Mon Sep 17 00:00:00 2001 From: zinc Date: Thu, 15 Oct 2026 14:33:28 +0330 Subject: hold: fixtures (accept, reject, race, rank order) and tests/drivers/hold_test.py --- tests/hold/accept/monitor.zc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/hold/accept/monitor.zc (limited to 'tests/hold/accept/monitor.zc') diff --git a/tests/hold/accept/monitor.zc b/tests/hold/accept/monitor.zc new file mode 100644 index 0000000..7dfe6f0 --- /dev/null +++ b/tests/hold/accept/monitor.zc @@ -0,0 +1,15 @@ +// expect: 902 +namespace; +include rt; +hold { + shared let c = 5; + shared int[3] hist; + fn bump(int k) { c = c + k; hist[0]++; return c; } + fn twice(int k) { bump(k); return bump(k); } + fn get() { return c * 100 + hist[0]; } +} +fn main() { + twice(2); + rt.put_n(get()); rt.put_c(10); + return 0; +} -- cgit v1.2.3