Add comprehensive packet test framework with 14 tests covering packet serialization/deserialization

Co-authored-by: aronwk-aaron <26027722+aronwk-aaron@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-08-31 04:40:11 +00:00
parent 065817b1ce
commit a82aeec50e
3 changed files with 522 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
set(DNETTESTS_SOURCES
"PacketTests.cpp"
)
# Set our executable
add_executable(dNetTests ${DNETTESTS_SOURCES})
# Needs to be in binary dir for ctest
if(APPLE)
add_custom_target(dNetTestsLink
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_CURRENT_BINARY_DIR})
add_dependencies(dNetTests dNetTestsLink)
endif()
# Link needed libraries
target_link_libraries(dNetTests ${COMMON_LIBRARIES} GTest::gtest_main dNet)
# Discover the tests
gtest_discover_tests(dNetTests)