diff options
1 files changed, 19 insertions, 19 deletions
| -rw-r--r-- | JSImpl/test/sprtTests.cpp | 38 |
diff --git a/JSImpl/test/sprtTests.cpp b/JSImpl/test/sprtTests.cpp index eef7147..8480554 100644 --- a/JSImpl/test/sprtTests.cpp +++ b/JSImpl/test/sprtTests.cpp @@ -81,7 +81,7 @@ TEST_F(SPRTTest, Div) }; Run(bytecode, sizeof(bytecode)); - ASSERT_EQ(Output.str(), "0"); + ASSERT_EQ(Output.str(), "0.857143"); } TEST_F(SPRTTest, Mod) @@ -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); |
