Added tests for flow control IMP.
[vvhitespace] / tests / 4003_flowcontrol_jump_if_tos_is_zero.pvvs
diff --git a/tests/4003_flowcontrol_jump_if_tos_is_zero.pvvs b/tests/4003_flowcontrol_jump_if_tos_is_zero.pvvs
new file mode 100644 (file)
index 0000000..42002b4
--- /dev/null
@@ -0,0 +1,10 @@
+# This test verifies the flow control IMP for jumping if TOS is zero.
+
+SSSTSSSSSTN     | ST: Push +65 (ASCII A)
+SSSSN           | ST: Push +0
+NTSTSTSTSN      | FC: BRZ -> '42'
+NNN             | FC: Terminate program
+NSSVTSTSTSN     | FC: Mark label '42'
+SNN             | ST: Drop TOS
+TNSS            | IO: Output character
+NNN             | FC: Terminate program