summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2025-08-09 04:45:40 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2025-08-09 04:45:40 +0200
commit091e1e639bb09568375c5b77a60b333d2f506c38 (patch)
tree6ba275a74ddfd1e3640da2b12bff74fb444b1600 /tests
parent8fed3ca3744c489e9e1d33fed7cf25a3dca26a21 (diff)
downloadbidi-091e1e639bb09568375c5b77a60b333d2f506c38.tar.gz
Cleaned up testing files
Diffstat (limited to 'tests')
-rw-r--r--tests/json.lua10
-rw-r--r--tests/test.lua (renamed from tests/graphics.lua)16
2 files changed, 16 insertions, 10 deletions
diff --git a/tests/json.lua b/tests/json.lua
deleted file mode 100644
index a659889..0000000
--- a/tests/json.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-local file = io.open("tests/test.json", "r")
-local content = file:read("*a")
-file:close()
-
-local data = json.decode(content)
-
-print("name: " .. data.name)
-for _, n in pairs(data.numbers) do
- print(" - number: " .. n)
-end
diff --git a/tests/graphics.lua b/tests/test.lua
index 1322101..74bf797 100644
--- a/tests/graphics.lua
+++ b/tests/test.lua
@@ -32,6 +32,19 @@ function get_random_color()
return color[randomKey] -- Return the corresponding color
end
+function test_json()
+ local file = io.open("tests/test.json", "r")
+ local content = file:read("*a")
+ file:close()
+
+ local data = json.decode(content)
+
+ print("name: " .. data.name)
+ for _, n in pairs(data.numbers) do
+ print(" - number: " .. n)
+ end
+end
+
function test_buttons()
-- Testing button presses.
if button_down(button.PAD_UP) then
@@ -110,6 +123,8 @@ function test_camera()
-- Using camera
move_camera(test_camera_position.x, test_camera_position.y)
+ draw_rect(100, 100, 300, 200, color.BLUE)
+
start_camera()
draw_rect(0, 0, 300, 200, color.YELLOW)
stop_camera()
@@ -121,6 +136,7 @@ while window_running() do
start_drawing()
clear_window(color.BLACK)
+ -- test_json()
-- test_api()
-- test_buttons()
-- test_camera()