Files
rfc5424/c_src/rfc5424_test.c
niamtokik aa61df20bb init
2022-04-11 14:50:19 +00:00

44 lines
657 B
C

/* file rfc5424_test.c */
/* http://www.jera.com/techinfo/jtns/jtn002.html */
#include <stdio.h>
#include "minunit.h"
int tests_run = 0;
int foo = 7;
int bar = 4;
static char *
test_foo() {
mu_assert("error, foo != 7", foo == 7);
return 0;
}
static char *
test_bar() {
mu_assert("error, bar != 5", bar != 5);
return 0;
}
static char *
all_tests() {
mu_run_test(test_foo);
mu_run_test(test_bar);
return 0;
}
int
main(int argc, char **argv) {
char *result = all_tests();
if (result != 0) {
printf("%s\n", result);
}
else {
printf("ALL TESTS PASSED\n");
}
printf("Tests run: %d\n", tests_run);
return result != 0;
}