mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add test.open_world
This commit is contained in:
parent
b05c2fc911
commit
cfc16679cb
3 changed files with 17 additions and 2 deletions
|
|
@ -1,8 +1,20 @@
|
|||
-- Create/close/open/close world
|
||||
|
||||
-- Open
|
||||
test.new_world("demo", "2019", "core:default")
|
||||
assert(world.is_open())
|
||||
assert(world.get_generator() == "core:default")
|
||||
test.sleep(1)
|
||||
assert(world.get_total_time() > 0.0)
|
||||
print(world.get_total_time())
|
||||
|
||||
-- Close
|
||||
test.close_world(true)
|
||||
assert(not world.is_open())
|
||||
|
||||
-- Reopen
|
||||
test.open_world("demo")
|
||||
assert(world.is_open())
|
||||
assert(world.get_total_time() > 0.0)
|
||||
test.tick()
|
||||
test.close_world(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue