Make header tests completely automatic

This commit is contained in:
Dmitry Marakasov 2014-12-18 14:54:53 +03:00
parent 941cc480c6
commit c5f7de0c46
13 changed files with 6 additions and 77 deletions

View File

@ -1,21 +1,3 @@
# 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
header_audio
header_exception
header_point
header_rect
header_renderer
header_rwops
header_extrarwops
header_sdl
header_sdl2pp
header_texture
header_wav
header_window
)
# simple command-line tests
SET(CLI_TESTS
test_pointrect
@ -30,9 +12,11 @@ SET(GUI_TESTS
ADD_DEFINITIONS(-DTESTDATA_DIR="${PROJECT_SOURCE_DIR}/testdata")
FOREACH(TEST ${HEADER_TESTS})
ADD_EXECUTABLE(${TEST} ${TEST}.cc)
ENDFOREACH(TEST ${TESTS})
FOREACH(HEADER ${LIBRARY_HEADERS})
STRING(MAKE_C_IDENTIFIER ${HEADER} HEADER_NORMALIZED)
CONFIGURE_FILE(header_test.cc.in ${HEADER_NORMALIZED}_test.cc)
ADD_EXECUTABLE(${HEADER_NORMALIZED}_test ${HEADER_NORMALIZED}_test.cc)
ENDFOREACH(HEADER ${TESTS})
FOREACH(TEST ${CLI_TESTS})
ADD_EXECUTABLE(${TEST} ${TEST}.cc)

View File

@ -1,5 +0,0 @@
#include <SDL2pp/Audio.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/Exception.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/ExtraRWops.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/Point.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/Rect.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/Renderer.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/RWops.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/SDL2pp.hh>
int main() {
return 0;
}

View File

@ -1,4 +1,4 @@
#include <SDL2pp/SDL.hh>
#include <@HEADER@>
int main() {
return 0;

View File

@ -1,5 +0,0 @@
#include <SDL2pp/Texture.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/Wav.hh>
int main() {
return 0;
}

View File

@ -1,5 +0,0 @@
#include <SDL2pp/Window.hh>
int main() {
return 0;
}