From 066b6a998666d3587d43b606cf4070391c94f1da Mon Sep 17 00:00:00 2001 From: Kyle Conel Date: Thu, 26 Sep 2024 11:10:35 -0400 Subject: [PATCH] Modules --- test/projects/SmokeTest/src/SmokeTest.jl | 9 ++++---- test/runtests.jl | 29 ++++++++++++------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/projects/SmokeTest/src/SmokeTest.jl b/test/projects/SmokeTest/src/SmokeTest.jl index d05a7f2..6d5737c 100644 --- a/test/projects/SmokeTest/src/SmokeTest.jl +++ b/test/projects/SmokeTest/src/SmokeTest.jl @@ -1,13 +1,13 @@ +module SmokeTest + using JulGame function run(SMOKETESTDIR, Test) JulGame.MAIN = JulGame.Main(Float64(1.0)) MAIN.testMode = true MAIN.testLength = 10.0 MAIN.currentTestTime = 0.0 - JulGame.PIXELS_PER_UNIT = 16 - scene = SceneBuilderModule.Scene("scene.json", SMOKETESTDIR) try - SceneBuilderModule.load_and_prepare_scene(;this=scene, globals=[Test]) + SceneBuilderModule.load_and_prepare_scene(;this=SceneBuilderModule.Scene("scene.json", SMOKETESTDIR), globals=[Test]) catch e @error e Base.show_backtrace(stderr, catch_backtrace()) @@ -15,4 +15,5 @@ end return 0 - end \ No newline at end of file + end +end # module \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 978ffa3..cac039a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,3 @@ -using JulGame using Test ROOTDIR = joinpath(@__DIR__, "..") @@ -6,24 +5,24 @@ EXAMPLEGAMEDIR = joinpath(ROOTDIR, "examples") SMOKETESTDIR = joinpath(@__DIR__, "projects", "SmokeTest") PROFILINGTESTDIR = joinpath(@__DIR__, "projects", "ProfilingTest") include(joinpath(SMOKETESTDIR, "src", "SmokeTest.jl")) -include(joinpath(PROFILINGTESTDIR, "Platformer", "src", "Platformer.jl")) +# include(joinpath(PROFILINGTESTDIR, "Platformer", "src", "Platformer.jl")) @testset "All tests" begin - cd(joinpath(@__DIR__, "projects", "ProfilingTest", "Platformer", "src")) - @testset "Platformer" begin - @test run_platformer() == 0 - end + # cd(joinpath(@__DIR__, "projects", "ProfilingTest", "Platformer", "src")) + # @testset "Platformer" begin + # @test run_platformer() == 0 + # end - include("math/mathtests.jl") + #include("math/mathtests.jl") cd(joinpath(SMOKETESTDIR, "src")) - @test run(SMOKETESTDIR, Test) == 0 + @test SmokeTest.run(SMOKETESTDIR, Test) == 0 - if !Sys.islinux() - cd(joinpath(ROOTDIR, "src", "editor", "JulGameEditor", "src")) - include(joinpath(ROOTDIR, "src", "editor", "JulGameEditor", "src", "../Editor.jl")) - @testset "Editor" begin - @test Editor.run(true) == 0 - end - end + # if !Sys.islinux() + # cd(joinpath(ROOTDIR, "src", "editor", "JulGameEditor", "src")) + # include(joinpath(ROOTDIR, "src", "editor", "JulGameEditor", "src", "../Editor.jl")) + # @testset "Editor" begin + # @test Editor.run(true) == 0 + # end + # end end \ No newline at end of file