1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2024-12-11 21:13:00 +01:00
libcproject/test/test.c

18 lines
484 B
C
Raw Normal View History

2023-01-07 19:38:01 +01:00
#include "test.h"
2023-01-05 19:28:05 +01:00
2023-06-25 15:17:46 +02:00
bool assert_string_equal(const string_t actual, const string_t expected) {
2023-01-05 19:28:05 +01:00
if (strcmp(expected, actual) != 0) {
printf("FAIL: expected = \"%s\" ; actual = \"%s\"\n", expected, actual);
return false;
}
return true;
}
2023-06-25 15:17:46 +02:00
bool assert_string_not_equal(const string_t actual, const string_t expected) {
2023-01-05 19:28:05 +01:00
if (strcmp(expected, actual) == 0) {
printf("FAIL: expected = \"%s\" ; actual = \"%s\"\n", expected, actual);
return false;
}
return true;
}