Files
uno-game/test/CMakeLists.txt
Kieran Kihn a10674fbd3 test(network): add unit tests for NetworkClient and NetworkServer
- Introduced comprehensive test cases for `NetworkClient` and `NetworkServer` functionality.
- Added tests for constructor, `connect`, `send`, `read`, and round-trip scenarios in `NetworkClientTest`.
- Added tests for player management, message sending, and concurrent access in `NetworkServerTest`.
- Updated `CMakeLists.txt` to include `NetworkClientTest` and `NetworkServerTest` in the build configuration.
2025-11-29 18:52:08 +08:00

28 lines
642 B
CMake

cmake_minimum_required(VERSION 4.0)
find_package(GTest REQUIRED)
set(CMAKE_CXX_STANDARD 26)
project(uno-game-test)
add_executable(uno-game-test
unit/game/CardTest.cpp
unit/game/CardTileTest.cpp
unit/game/PlayerTest.cpp
unit/game/GameStateTest.cpp
unit/network/MessageSerializerTest.cpp
unit/network/NetworkServerTest.cpp
unit/network/NetworkClientTest.cpp
)
target_link_libraries(uno-game-test
PUBLIC uno-game-lib
)
target_link_libraries(uno-game-test
PRIVATE GTest::gtest
PRIVATE GTest::gtest_main
)
include(GoogleTest)
gtest_discover_tests(uno-game-test)