Skip to content

Commit

Permalink
Tests: Add an initial integration test for glfw windowing
Browse files Browse the repository at this point in the history
Can't use events yet because of the callback interoperability issue.
  • Loading branch information
rdw-software committed Jun 19, 2023
1 parent 33b5272 commit a1ede92
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Tests/Integration/glfw-window-events.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
local glfw = require("glfw")

glfw.bindings.glfw_init()

local _ = glfw.bindings.glfw_create_window(800, 600, "GLFW Test", nil, nil)

local ticker = C_Timer.NewTicker(250, function()
print("glfw_poll_events")
glfw.bindings.glfw_poll_events()
end)

C_Timer.After(2500, function()
print("glfw_terminate")
glfw.bindings.glfw_terminate()
ticker:stop()
end)
1 change: 1 addition & 0 deletions Tests/integration-test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local testFiles = {
"Tests/Integration/websocket-echo-server.lua",
"Tests/Integration/websocket-event-queue.lua",
"Tests/Integration/websocket-messaging.lua",
"Tests/Integration/glfw-window-events.lua",
"Tests/Integration/http-routing.lua",
"Tests/Integration/http-event-queue.lua",
"Tests/Integration/http-shutdown-with-503.lua",
Expand Down

0 comments on commit a1ede92

Please sign in to comment.