From 55aedbac38582f52d04879f6903b94995df657ed Mon Sep 17 00:00:00 2001 From: Moaaz Assali <66834697+moaazassali@users.noreply.github.com> Date: Sun, 7 Jul 2024 20:15:40 +0400 Subject: [PATCH] added server info wrapper tests --- tests/structs/server_info_wrapper_tests.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/structs/server_info_wrapper_tests.cpp b/tests/structs/server_info_wrapper_tests.cpp index e69de29..83f8a40 100644 --- a/tests/structs/server_info_wrapper_tests.cpp +++ b/tests/structs/server_info_wrapper_tests.cpp @@ -0,0 +1,14 @@ +#include + +#include "structs/server_info_wrapper.h" + +TEST_CASE("Correctly free server info") { + chc_server_info info{}; + info.name = new char[5]; + info.timezone = new char[5]; + info.display_name = new char[5]; + chc_server_info_free(&info); + CHECK(info.name == nullptr); + CHECK(info.timezone == nullptr); + CHECK(info.display_name == nullptr); +}