lib

morphux C utility library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/lib

commit d832efab494bf83ea0bcf90a8381641a4e6263ba
parent 34189edd7a243137c89a74947c6d3a2f26c5859f
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue, 24 Jan 2017 15:34:29 +0100

Fix(Tests): Fix {set,get}_maintainer tests:

Fix some wrong error messages too

Diffstat:
Mtests/test_infos.c | 36++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/tests/test_infos.c b/tests/test_infos.c @@ -28,56 +28,56 @@ TEST(program_name_4) { } TEST(version_1) { - TEST_ASSERT((get_version() == NULL), "Wrong program name init"); + TEST_ASSERT((get_version() == NULL), "Wrong version init"); return TEST_SUCCESS; } TEST(version_2) { set_version("Hey !"); - TEST_ASSERT(strcmp(get_version(), "Hey !") == 0, "Wrong program_name return"); + TEST_ASSERT(strcmp(get_version(), "Hey !") == 0, "Wrong version return"); return TEST_SUCCESS; } TEST(version_3) { - TEST_ASSERT(strcmp(get_version(), "Hey !") == 0, "Wrong program_name return"); + TEST_ASSERT(strcmp(get_version(), "Hey !") == 0, "Wrong version return"); set_version("Yo !"); - TEST_ASSERT(strcmp(get_version(), "Yo !") == 0, "Wrong program_name return"); + TEST_ASSERT(strcmp(get_version(), "Yo !") == 0, "Wrong version return"); return TEST_SUCCESS; } TEST(version_4) { - TEST_ASSERT(strcmp(get_version(), "Yo !") == 0, "Wrong program_name return"); + TEST_ASSERT(strcmp(get_version(), "Yo !") == 0, "Wrong version return"); set_version(""); - TEST_ASSERT((get_version() == NULL), "Wrong program_name return"); + TEST_ASSERT((get_version() == NULL), "Wrong version return"); set_version(NULL); - TEST_ASSERT((get_version() == NULL), "Wrong program_name return"); + TEST_ASSERT((get_version() == NULL), "Wrong version return"); return TEST_SUCCESS; } TEST(maintainer_1) { - TEST_ASSERT((get_version() == NULL), "Wrong program name init"); + TEST_ASSERT((get_maintainer() == NULL), "Wrong maintainer init"); return TEST_SUCCESS; } TEST(maintainer_2) { - set_version("Hey !"); - TEST_ASSERT(strcmp(get_version(), "Hey !") == 0, "Wrong program_name return"); + set_maintainer("Hey !"); + TEST_ASSERT(strcmp(get_maintainer(), "Hey !") == 0, "Wrong maintainer return"); return TEST_SUCCESS; } TEST(maintainer_3) { - TEST_ASSERT(strcmp(get_version(), "Hey !") == 0, "Wrong program_name return"); - set_version("Yo !"); - TEST_ASSERT(strcmp(get_version(), "Yo !") == 0, "Wrong program_name return"); + TEST_ASSERT(strcmp(get_maintainer(), "Hey !") == 0, "Wrong maintainer return"); + set_maintainer("Yo !"); + TEST_ASSERT(strcmp(get_maintainer(), "Yo !") == 0, "Wrong maintainer return"); return TEST_SUCCESS; } TEST(maintainer_4) { - TEST_ASSERT(strcmp(get_version(), "Yo !") == 0, "Wrong program_name return"); - set_version(""); - TEST_ASSERT((get_version() == NULL), "Wrong program_name return"); - set_version(NULL); - TEST_ASSERT((get_version() == NULL), "Wrong program_name return"); + TEST_ASSERT(strcmp(get_maintainer(), "Yo !") == 0, "Wrong maintainer return"); + set_maintainer(""); + TEST_ASSERT((get_maintainer() == NULL), "Wrong maintainer return"); + set_maintainer(NULL); + TEST_ASSERT((get_maintainer() == NULL), "Wrong maintainer return"); return TEST_SUCCESS; }