39 note(
"This is some text.\n");
40 note(
"This is %s with %.2f.\n",
"formatted text", 1.231234);
46 note(
"This is some more text.\n");
47 note(
"This shouldn't appear in the output file.\n");
50 fid = fopen(
"./data/test_note_print.txt",
"r");
53 mu_assert(strcmp(buffer,
"This is some text.\n") == 0,
54 "Line doesn't contain expected content (1)");
57 mu_assert(strcmp(buffer,
"This is formatted text with 1.23.\n") == 0,
58 "Line doesn't contain expected content (2)");
73 err(
"This is some text.\n");
74 err(
"This is %s with %.2f.\n",
"formatted text", 1.231234);
80 err(
"This is some more text.\n");
81 err(
"This shouldn't appear in the output file.\n");
84 fid = fopen(
"./data/test_err_print.txt",
"r");
87 mu_assert(strcmp(buffer,
"This is some text.\n") == 0,
88 "Line doesn't contain expected content (1)");
91 mu_assert(strcmp(buffer,
"This is formatted text with 1.23.\n") == 0,
92 "Line doesn't contain expected content (2)");
Minimal unit testing framework for C.
void err(const char *fmt,...)
Parse a formatted string and write it to standard error.
#define mu_assert(test, message)
#define GENSVM_MAX_LINE_LENGTH
#define mu_run_test(test)
FILE * GENSVM_OUTPUT_FILE
Header file for gensvm_print.c.
void note(const char *fmt,...)
Parse a formatted string and write to the output stream.