diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2023-11-24 21:45:42 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2023-11-24 21:45:42 -0600 |
| commit | b26614f10d13835c8a9b6856abcad6ad057c904e (patch) | |
| tree | 29f5ea3cc0e1bc784c610a8b272e141e5d03aba0 /spec/test2_spec.lua | |
| parent | da0d5a002e69faf69c4cbc9720248f3b556ee011 (diff) | |
| download | brokengine-b26614f10d13835c8a9b6856abcad6ad057c904e.tar.gz brokengine-b26614f10d13835c8a9b6856abcad6ad057c904e.tar.bz2 brokengine-b26614f10d13835c8a9b6856abcad6ad057c904e.zip | |
Add some asserts and fix the networking test
Diffstat (limited to 'spec/test2_spec.lua')
| -rw-r--r-- | spec/test2_spec.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/test2_spec.lua b/spec/test2_spec.lua index 82ca33e..575e1d1 100644 --- a/spec/test2_spec.lua +++ b/spec/test2_spec.lua @@ -77,14 +77,16 @@ describe("network library",function() end)
end
local i = os.time()
+ local game_exit = GAME.exit
function GAME.tick()
if has_ponged then
- GAME.exit()
+ game_exit()
end
if i - os.time() > 5 then
error("Failed")
end
end
+ GAME.exit = function(...) end -- only exit when we pong, not before.
]])
common.writegame([[
local socket = net.newsocket(net.PAIR)
|
