From 142b9b059bf50138f22e654553b802bb1ddc3110 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 16 Dec 2015 19:39:07 +0800 Subject: [PATCH] lit-test: add tests for control flow in parallel blocks. --- lit-test/test/interleaving/control_flow.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lit-test/test/interleaving/control_flow.py diff --git a/lit-test/test/interleaving/control_flow.py b/lit-test/test/interleaving/control_flow.py new file mode 100644 index 000000000..d0288a472 --- /dev/null +++ b/lit-test/test/interleaving/control_flow.py @@ -0,0 +1,17 @@ +# RUN: %python -m artiq.compiler.testbench.jit %s >%t +# RUN: OutputCheck %s --file-to-check=%t + +def f(): + with parallel: + if True: + print(1) + else: + print(2) + while False: + print(3) + delay_mu(1) + print(4) + +# CHECK-L: 1 +# CHECK-L: 4 +f()