mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 19:05:59 -04:00
Add basic tests
For now the only thing checked is that header files compile by themselves, e.g. includes and forward declarations in them are complete and they do not require extra includes
This commit is contained in:
parent
a8baa2df30
commit
3df16d40d1
@ -35,8 +35,9 @@ IF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
ADD_LIBRARY(SDL2pp SHARED ${LIBRARY_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(SDL2pp ${SDL2_LIBRARY})
|
||||
|
||||
# demos
|
||||
# demos and tests
|
||||
ADD_SUBDIRECTORY(demos)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
ELSE(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
MESSAGE(STATUS "libSDL2pp bundled build")
|
||||
|
||||
|
17
tests/CMakeLists.txt
Normal file
17
tests/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# header tests: these just include specific headers to check if
|
||||
# they are compilable (e.g., includes and forward declarations are
|
||||
# complete and do not require extra includes)
|
||||
SET(HEADER_TESTS
|
||||
hdr_exception
|
||||
hdr_point
|
||||
hdr_rect
|
||||
hdr_renderer
|
||||
hdr_sdl
|
||||
hdr_sdl2pp
|
||||
hdr_texture
|
||||
hdr_window
|
||||
)
|
||||
|
||||
FOREACH(TEST ${HEADER_TESTS})
|
||||
ADD_EXECUTABLE(${TEST} ${TEST}.cc)
|
||||
ENDFOREACH(TEST ${TESTS})
|
5
tests/hdr_exception.cc
Normal file
5
tests/hdr_exception.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <SDL2pp/Exception.hh>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
5
tests/hdr_point.cc
Normal file
5
tests/hdr_point.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <SDL2pp/Point.hh>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
5
tests/hdr_rect.cc
Normal file
5
tests/hdr_rect.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <SDL2pp/Rect.hh>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
5
tests/hdr_renderer.cc
Normal file
5
tests/hdr_renderer.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <SDL2pp/Renderer.hh>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
5
tests/hdr_sdl.cc
Normal file
5
tests/hdr_sdl.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <SDL2pp/SDL.hh>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
5
tests/hdr_sdl2pp.cc
Normal file
5
tests/hdr_sdl2pp.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <SDL2pp/SDL2pp.hh>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
5
tests/hdr_texture.cc
Normal file
5
tests/hdr_texture.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <SDL2pp/Texture.hh>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
5
tests/hdr_window.cc
Normal file
5
tests/hdr_window.cc
Normal file
@ -0,0 +1,5 @@
|
||||
#include <SDL2pp/Window.hh>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user