From 76bd70d833b6ad6043713d6385184b0e3496b4be Mon Sep 17 00:00:00 2001 From: Francesco Cozzuto Date: Mon, 23 Jan 2023 13:28:32 +0100 Subject: [PATCH] tests for NLB and STP instructions --- tests/runtime/nlb/nlb_00.noja-test | 13 +++++++++++++ tests/runtime/stp/stp_00.noja-test | 14 ++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tests/runtime/nlb/nlb_00.noja-test create mode 100644 tests/runtime/stp/stp_00.noja-test diff --git a/tests/runtime/nlb/nlb_00.noja-test b/tests/runtime/nlb/nlb_00.noja-test new file mode 100644 index 0000000..44d429b --- /dev/null +++ b/tests/runtime/nlb/nlb_00.noja-test @@ -0,0 +1,13 @@ +@type [runtime] + +@bytecode + + PUSHVAR "int"; + NLB; + + PUSHVAR "print"; + CALL 1, 1; + POP 1; + EXIT; + +@output [?int] \ No newline at end of file diff --git a/tests/runtime/stp/stp_00.noja-test b/tests/runtime/stp/stp_00.noja-test new file mode 100644 index 0000000..91a55a9 --- /dev/null +++ b/tests/runtime/stp/stp_00.noja-test @@ -0,0 +1,14 @@ +@type [runtime] + +@bytecode + + PUSHVAR "int"; + PUSHVAR "float"; + STP; + + PUSHVAR "print"; + CALL 1, 1; + POP 1; + EXIT; + +@output [int | float] \ No newline at end of file