Skip to content

Commit

Permalink
added server info wrapper tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moaazassali committed Jul 7, 2024
1 parent 576ce2a commit 55aedba
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/structs/server_info_wrapper_tests.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <doctest/doctest.h>

#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);
}

0 comments on commit 55aedba

Please sign in to comment.