From 91603188aae2d9f09a41e3d477bfd0a04b4c37f0 Mon Sep 17 00:00:00 2001 From: Kyle Conel Date: Thu, 26 Sep 2024 11:33:38 -0400 Subject: [PATCH] more test --- test/math/mathtests.jl | 1 + .../Platformer/src/Platformer.jl | 3 +++ test/runtests.jl | 26 +++++++++---------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/test/math/mathtests.jl b/test/math/mathtests.jl index fff6c0fe..0ff2cd73 100644 --- a/test/math/mathtests.jl +++ b/test/math/mathtests.jl @@ -1,3 +1,4 @@ +using JulGame @testset "Math tests" begin include("lerptests.jl") include("vectortests.jl") diff --git a/test/projects/ProfilingTest/Platformer/src/Platformer.jl b/test/projects/ProfilingTest/Platformer/src/Platformer.jl index 24e43748..409bd230 100644 --- a/test/projects/ProfilingTest/Platformer/src/Platformer.jl +++ b/test/projects/ProfilingTest/Platformer/src/Platformer.jl @@ -1,3 +1,5 @@ +module PlatformerModule + using JulGame function run_platformer() JulGame.MAIN = JulGame.Main(Float64(1.0)) MAIN.testMode = true @@ -15,6 +17,7 @@ return 0 end +end # module # comment when building # Platformer.run() diff --git a/test/runtests.jl b/test/runtests.jl index cac039a9..d64dce73 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,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 PlatformerModule.run_platformer() == 0 + end - #include("math/mathtests.jl") + include("math/mathtests.jl") cd(joinpath(SMOKETESTDIR, "src")) @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