protocol

protocol tests
Log | Files | Refs | Submodules | README | git clone https://git.ne02ptzero.me/git/protocol

commit a9d59dbd3a70f0b0fa222b26daff10da6b0cf491
parent abe016ef2df273da34e824f5c32d3298b2bbe9a2
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Fri, 17 Mar 2017 17:54:57 +0100

Fix(Add Assertion for server connection)

Diffstat:
Msrc/client_test.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/client_test.c b/src/client_test.c @@ -37,6 +37,7 @@ TEST(pkg_auth_1_read) { void *ret; package_t *pkg; + TEST_ASSERT(sockfd, "Server is not responding"); ret = malloc(2048); read(sockfd, ret, 2048); pkg = read_pkg(ret); @@ -45,6 +46,7 @@ TEST(pkg_auth_1_read) { } TEST(cleanup) { + TEST_ASSERT(sockfd, "Server is not responding"); TEST_ASSERT(close(sockfd) != -1, "Cannot close socket"); return TEST_SUCCESS; }