mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 02:08:20 +00:00
835cf2b794
* Add AMFDeserializer Add an AMFDeserializer Reverted unrelated changes Add unit tests for AMFDeserializer Added unit tests for the AMFDeserializer Finish tests Finish the AMF deserializer tests. This commit finishes the positive test case and implements a load test case that is expected to take less than 1.5 seconds to process. Modularized tests Made tests a bit modular and split into more methods Specified binary read from file Specified that on the IO stream we are reading a binary file otherwise windows will terminate reading the binary file on seeing a 1A byte. Added more tests Added tests for unimplemented values and edited a test file to be more modular Updated test text Fix spacing Update AMFDeserializeTests.cpp * Update CMakeLists.txt * Update AMFDeserializeTests.cpp f Actually follow the AMF spec Update AMFDeserializeTests.cpp tabs Add in commented tests * Follow spec formatting Add Integer Tests Follow Spec more Follow spec * Use unique_ptr * Update AMFDeserialize.cpp Semantics Update AMFDeserialize.cpp Add new lines to EOF CMake fix * Add better std string read Co-authored-by: Daniel Seiler <xiphoseer@mailbox.org> * make not static Co-authored-by: Daniel Seiler <xiphoseer@mailbox.org>
34 lines
992 B
CMake
34 lines
992 B
CMake
# create the testing file and list of tests
|
|
create_test_sourcelist (Tests
|
|
CommonCxxTests.cpp
|
|
AMFDeserializeTests.cpp
|
|
TestNiPoint3.cpp
|
|
TestLDFFormat.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 ()
|