aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2023-12-13 10:40:59 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2023-12-13 10:40:59 +0100
commit3087897c5aa716579b1255ac8c65dc1438515822 (patch)
tree8ae222b146e8222e7fff4364fcc3d7dc90a4416a /test
parent63897b552fc0d0a2544a547318017485ed220c67 (diff)
downloadaoc2023.nes-3087897c5aa716579b1255ac8c65dc1438515822.tar.gz
aoc2023.nes-3087897c5aa716579b1255ac8c65dc1438515822.zip
Implemented the first part of day 4
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'test')
-rw-r--r--test/4.lua13
-rw-r--r--test/run.sh2
2 files changed, 14 insertions, 1 deletions
diff --git a/test/4.lua b/test/4.lua
new file mode 100644
index 0000000..41cbec2
--- /dev/null
+++ b/test/4.lua
@@ -0,0 +1,13 @@
+utils = require "utils"
+
+utils.StartRun("4")
+
+utils.MemTest("@test", {{0x07, "92"}, {0x08, "52"}})
+
+-- The test appears to be done in a few frames. Let's run this several times
+-- just in case.
+for i = 0, 150, 1 do
+ emu.frameadvance();
+end
+
+utils.EndRun()
diff --git a/test/run.sh b/test/run.sh
index f8eac6c..527262d 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 3); do
+for name in $(seq 4); do
DEBUG=1 make out/$name.nes
fceux --loadlua "$ROOT/test/$name.lua" "$ROOT/out/$name.nes"
done