mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 12:39:13 +12:00
Initialize catch-2 based unit tests
This commit is contained in:
parent
929019e76b
commit
4b6266e3f2
2 changed files with 27 additions and 0 deletions
|
@ -33,6 +33,7 @@ option(GPU_DEBUG_INFO "Enable additional GPU debugging info" OFF)
|
||||||
option(ENABLE_OPENGL "Enable OpenGL rendering backend" ON)
|
option(ENABLE_OPENGL "Enable OpenGL rendering backend" ON)
|
||||||
option(ENABLE_VULKAN "Enable Vulkan rendering backend" ON)
|
option(ENABLE_VULKAN "Enable Vulkan rendering backend" ON)
|
||||||
option(ENABLE_LTO "Enable link-time optimization" OFF)
|
option(ENABLE_LTO "Enable link-time optimization" OFF)
|
||||||
|
option(ENABLE_TESTS "Compile unit-tests" OFF)
|
||||||
option(ENABLE_USER_BUILD "Make a user-facing build. These builds have various assertions disabled, LTO, and more" OFF)
|
option(ENABLE_USER_BUILD "Make a user-facing build. These builds have various assertions disabled, LTO, and more" OFF)
|
||||||
option(ENABLE_HTTP_SERVER "Enable HTTP server. Used for Discord bot support" OFF)
|
option(ENABLE_HTTP_SERVER "Enable HTTP server. Used for Discord bot support" OFF)
|
||||||
option(ENABLE_DISCORD_RPC "Compile with Discord RPC support (disabled by default)" ON)
|
option(ENABLE_DISCORD_RPC "Compile with Discord RPC support (disabled by default)" ON)
|
||||||
|
@ -520,3 +521,19 @@ endif()
|
||||||
if(ENABLE_LTO OR ENABLE_USER_BUILD)
|
if(ENABLE_LTO OR ENABLE_USER_BUILD)
|
||||||
set_target_properties(Alber PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
|
set_target_properties(Alber PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_TESTS)
|
||||||
|
enable_testing()
|
||||||
|
find_package(Catch2 3 REQUIRED)
|
||||||
|
add_executable(AlberTests
|
||||||
|
tests/dynapica.cpp
|
||||||
|
)
|
||||||
|
target_link_libraries(
|
||||||
|
AlberTests
|
||||||
|
PRIVATE
|
||||||
|
Catch2::Catch2WithMain
|
||||||
|
AlberCore
|
||||||
|
)
|
||||||
|
|
||||||
|
add_test(AlberTests AlberTests)
|
||||||
|
endif()
|
10
tests/dynapica.cpp
Normal file
10
tests/dynapica.cpp
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#include <PICA/dynapica/shader_rec.hpp>
|
||||||
|
#include <catch2/catch_approx.hpp>
|
||||||
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
|
#include "PICA/shader.hpp"
|
||||||
|
|
||||||
|
#if defined(PANDA3DS_SHADER_JIT_SUPPORTED)
|
||||||
|
TEST_CASE("Test", "[shader][dynapica]") {}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Add table
Add a link
Reference in a new issue