1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2024-09-17 04:45:54 +02:00
libcproject/test/test.c
2023-01-05 19:28:05 +01:00

20 lines
514 B
C

#include <stdbool.h>
#include <stdio.h>
#include <string.h>
bool assert_string_equal(const char *actual, const char *expected) {
if (strcmp(expected, actual) != 0) {
printf("FAIL: expected = \"%s\" ; actual = \"%s\"\n", expected, actual);
return false;
}
return true;
}
bool assert_string_not_equal(const char *actual, const char *expected) {
if (strcmp(expected, actual) == 0) {
printf("FAIL: expected = \"%s\" ; actual = \"%s\"\n", expected, actual);
return false;
}
return true;
}