CMakeLists.txt 2.43 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
INCLUDE_DIRECTORIES(${KWStyle_SOURCE_DIR})

SET(KWSTYLE_TESTS  ${CXX_TEST_PATH}/KWStyleTests)

SET(
 KWStyleTests_SRCS
 kwsSemiColonSpaceTest.cxx
 kwsStatementPerLineTest.cxx
 kwsVariablePerLineTest.cxx
 kwsSwitchCaseTest.cxx
 kwsBadCharactersTest.cxx
)

FOREACH(TestFiles ${KWStyleTests_SRCS})   
  GET_FILENAME_COMPONENT(TestProgram ${TestFiles} NAME_WE)   
  ADD_TEST(${TestProgram} ${KWSTYLE_TESTS} ${TestProgram}) 
ENDFOREACH(TestFiles)

SET(KWStyleTests_SRCS
 ${KWStyleTests_SRCS}
 kwsRunKWStyleTest.cxx
 )

ADD_EXECUTABLE( KWStyleTests KWStyleTests.cxx ${KWStyleTests_SRCS})
TARGET_LINK_LIBRARIES(KWStyleTests KWStyleLib kwssys)


MACRO(ADD_TEST_FROM_BUG_TRACKER BUG_NUMBER FILENAME)
  ADD_TEST(Test${BUG_NUMBER} ${KWSTYLE_TESTS}
  --compare ${KWStyle_SOURCE_DIR}/Testing/Data/${BUG_NUMBER}-output.xml
            ${KWStyle_BINARY_DIR}/${BUG_NUMBER}-output.xml
  kwsRunKWStyleTest ${KWStyle_BINARY_DIR}/KWStyle -xml ${KWStyle_SOURCE_DIR}/Testing/Data/${BUG_NUMBER}-KWStyleConfiguration.kws.xml
  -exportxml ${KWStyle_BINARY_DIR}/${BUG_NUMBER}-output.xml
  ${KWStyle_SOURCE_DIR}/Testing/Data/${BUG_NUMBER}-${FILENAME})

ENDMACRO(ADD_TEST_FROM_BUG_TRACKER BUG_NUMBER FILENAME)

38
ADD_TEST_FROM_BUG_TRACKER(kwsTabsTest test.cxx)
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
ADD_TEST_FROM_BUG_TRACKER(0001 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4204 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4227 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4259 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4260 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4262 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4296 test.h)
ADD_TEST_FROM_BUG_TRACKER(4297 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4301 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4302 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4303 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4316 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4317 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4318 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4319 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4327 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4344 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4345 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(4518 test.h)
ADD_TEST_FROM_BUG_TRACKER(4531 test.h)
ADD_TEST_FROM_BUG_TRACKER(4549 test.h)
ADD_TEST_FROM_BUG_TRACKER(5031 test.cpp)
ADD_TEST_FROM_BUG_TRACKER(5032 test.h)
ADD_TEST_FROM_BUG_TRACKER(5059 test.h)
ADD_TEST_FROM_BUG_TRACKER(5086 test.h)
64 65 66 67 68
ADD_TEST_FROM_BUG_TRACKER(9934 test.h)
ADD_TEST_FROM_BUG_TRACKER(9935 test.cxx)
ADD_TEST_FROM_BUG_TRACKER(9937 test.cxx)
ADD_TEST_FROM_BUG_TRACKER(9938 test.cxx)
ADD_TEST_FROM_BUG_TRACKER(9939 test.cxx)
69
ADD_TEST_FROM_BUG_TRACKER(10872 test.cxx)