Untitled
unknown
plain_text
15 days ago
626 B
2
Indexable
Never
#include <stdio.h> #include <string.h> #include "text_manipulation.h" /******************************************************** * Prints a pass or fail message for the specified test.* ********************************************************/ void test_assert(int test_result, const char *test_name, int test_number) { if (test_result) { printf("pass %s %d\n", test_name, test_number); } else { printf("fail %s %d\n", test_name, test_number); } } int main() { char result[MAX_STR_LEN + 1]; center("s", 1, result); test_assert(strcmp(result, " dogs ") == 0, "center", 1); return 0; }
Leave a Comment