diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/3.lua | 13 | ||||
| -rw-r--r-- | test/defines.s | 10 | ||||
| -rw-r--r-- | test/run.sh | 2 | ||||
| -rw-r--r-- | test/utils.lua | 3 |
4 files changed, 15 insertions, 13 deletions
diff --git a/test/3.lua b/test/3.lua new file mode 100644 index 0000000..6fdbdae --- /dev/null +++ b/test/3.lua @@ -0,0 +1,13 @@ +utils = require "utils" + +utils.StartRun("3") + +utils.MemTest("@test", {{0x0C, "BE"}, {0x0D, "35"}, {0x0E, "08"}, {0x0F, "00"}}) + +-- This test is either flaky or it takes a long ass time. Let's wait for a +-- little while longer than usual. +for i = 0, 300, 1 do + emu.frameadvance(); +end + +utils.EndRun() diff --git a/test/defines.s b/test/defines.s index 17c0221..cf15595 100644 --- a/test/defines.s +++ b/test/defines.s @@ -1,11 +1 @@ RUN_TESTS = 0 - -.macro CALL_TESTS_ON_DONE - .ifdef RUN_TESTS - bit Globals::m_flags - bvc :+ - @test: - nop - : - .endif -.endmacro diff --git a/test/run.sh b/test/run.sh index 2142ad1..f8eac6c 100644 --- a/test/run.sh +++ b/test/run.sh @@ -19,7 +19,7 @@ if [ -n "${GITHUB_ACTION}" ]; then fi # Run all the tests that we have on Lua. -for name in $(seq 2); do +for name in $(seq 3); do DEBUG=1 make out/$name.nes fceux --loadlua "$ROOT/test/$name.lua" "$ROOT/out/$name.nes" done diff --git a/test/utils.lua b/test/utils.lua index c5ecd94..2cd713a 100644 --- a/test/utils.lua +++ b/test/utils.lua @@ -48,10 +48,9 @@ function utils.MemTest(label, addresses) if expected == got then io.write("OK\n") else - io.write("\n-> Test '".. label .."': FAIL\n") + io.write("FAIL\n") io.write("Expected: ".. expected .. "\n") io.write("Got: ".. got .. "\n") - io.write("\n") end io.close(file) end) |
