mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
9813c3ed2c
* ASCIIToUTF16: output replacement character instead of failing assert * Add GeneralUtils::_NextUTF8Char * Implement GeneralUtils::UTF8ToUTF16 * use string_view everywhere * use string_view::front instead of begin * Add PushUTF16CodePoint
35 lines
1010 B
CMake
35 lines
1010 B
CMake
# create the testing file and list of tests
|
|
create_test_sourcelist (Tests
|
|
CommonCxxTests.cpp
|
|
AMFDeserializeTests.cpp
|
|
TestNiPoint3.cpp
|
|
TestLDFFormat.cpp
|
|
TestEncoding.cpp
|
|
)
|
|
|
|
# add the executable
|
|
add_executable (CommonCxxTests ${Tests})
|
|
target_link_libraries(CommonCxxTests ${COMMON_LIBRARIES})
|
|
|
|
# remove the test driver source file
|
|
set (TestsToRun ${Tests})
|
|
remove (TestsToRun CommonCxxTests.cpp)
|
|
|
|
# Copy test files to testing directory
|
|
configure_file(
|
|
${CMAKE_SOURCE_DIR}/tests/TestBitStreams/AMFBitStreamTest.bin ${PROJECT_BINARY_DIR}/tests/AMFBitStreamTest.bin
|
|
COPYONLY
|
|
)
|
|
|
|
configure_file(
|
|
${CMAKE_SOURCE_DIR}/tests/TestBitStreams/AMFBitStreamUnimplementedTest.bin ${PROJECT_BINARY_DIR}/tests/AMFBitStreamUnimplementedTest.bin
|
|
COPYONLY
|
|
)
|
|
|
|
# Add all the ADD_TEST for each test
|
|
foreach (test ${TestsToRun})
|
|
get_filename_component (TName ${test} NAME_WE)
|
|
add_test (NAME ${TName} COMMAND CommonCxxTests ${TName})
|
|
set_property(TEST ${TName} PROPERTY ENVIRONMENT CTEST_OUTPUT_ON_FAILURE=1)
|
|
endforeach ()
|