From ddc50fe944df0a33386a3213c8021f07ac8ffdd9 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Thu, 22 Nov 2018 14:32:02 +0200 Subject: Support for line numbers and comments --- JSImpl/test/sprtTests.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'JSImpl/test/sprtTests.cpp') diff --git a/JSImpl/test/sprtTests.cpp b/JSImpl/test/sprtTests.cpp index 787d9eb..8480554 100644 --- a/JSImpl/test/sprtTests.cpp +++ b/JSImpl/test/sprtTests.cpp @@ -235,24 +235,24 @@ TEST_F(SPRTTest, Read) TEST_F(SPASMTest, RSyntax) { const char* program = - "push 5" "\n" - "const r1 0" "\n" - "const r2 6" "\n" - "const r3 7" "\n" - "const r4 2" "\n" - "pushr r3" "\n" - "pushr r2" "\n" - "pushr r4" "\n" - "call mult" "\n" - "popr r1" "\n" - "print r1" "\n" - "halt" "\n" - "label mult" "\n" - "print a0" "\n" - "print a1" "\n" - "print a2" "\n" - "mul r1 a2 a1" "\n" - "ret r1" "\n" + "00: push 5" "\n" + "01: const r1 0" "\n" + "02: const r2 6" "\n" + "03: const r3 7" "\n" + "04: const r4 2" "\n" + "05: pushr r3" "\n" + "06: pushr r2" "\n" + "07: pushr r4" "\n" + "08: call mult # *" "\n" + "09: popr r1" "\n" + "10: print r1" "\n" + "11: halt" "\n" + "12: label mult" "\n" + "13: print a0" "\n" + "14: print a1" "\n" + "15: print a2" "\n" + "16: mul r1 a2 a1" "\n" + "17: ret r1" "\n" "" ; CompileAndRun(program); -- cgit v1.3.1-23-gd82d