Browse Source

Tests exit;

bjorn 1 year ago
parent
commit
62eff9d86d

+ 2 - 0
tests/buffers.lua

@@ -120,3 +120,5 @@ function lovr.load()
   pass:send('s', { a = 1, b = 2, c = 3 })
   pass:send('t', { { a = 1, b = 2, c = 3 }, { a = 4, b = 5, c = 6 } })
 end
+
+lovr.event.quit()

+ 2 - 0
tests/canvas.lua

@@ -6,3 +6,5 @@ function lovr.load()
   pass:setCanvas()
   assert(pass:getWidth() == 0 and pass:getHeight() == 0)
 end
+
+lovr.event.quit()

+ 2 - 0
tests/distant-colliders.lua

@@ -4,3 +4,5 @@ function lovr.load()
   c2 = world:newBoxCollider(1e8, 0, 0)
   world:update(1)
 end
+
+lovr.event.quit()

+ 2 - 0
tests/font-from-rasterizer.lua

@@ -5,3 +5,5 @@ function lovr.load()
   end
   collectgarbage()
 end
+
+lovr.event.quit()

+ 2 - 0
tests/joints.lua

@@ -9,3 +9,5 @@ function lovr.load()
   assert(vec3(select(1, joint:getAnchors())):equals(anchor1))
   assert(vec3(select(4, joint:getAnchors())):equals(anchor2))
 end
+
+lovr.event.quit()

+ 2 - 0
tests/render-to-depth-texture.lua

@@ -3,3 +3,5 @@ function lovr.load()
   p = lovr.graphics.newPass({ depth = t })
   lovr.graphics.submit(p)
 end
+
+lovr.event.quit()

+ 7 - 3
tests/thread-object-arguments.lua

@@ -1,5 +1,9 @@
 function lovr.load()
-  lovr.thread.newThread([[
-    print(...)
-  ]]):start(lovr.data.newBlob(1))
+  local thread = lovr.thread.newThread([[
+    assert(type(...) == 'userdata')
+  ]])
+  thread:start(lovr.data.newBlob(1))
+  thread:wait()
 end
+
+lovr.event.quit()