#include #include // for strcmp #include // for free #include // for assert #include "reverse.h" // for ReverseString int main(int argc, char **argv) { char *t1 = "hi", *t2 = "123", *t3 = ""; char *o1, *o2, *o3; assert(ReverseString(t1, &o1) == 1); printf("%s\n", o1); assert(strcmp(o1, "ih") == 0); assert(ReverseString(t2, &o2) == 1); printf("%s\n", o2); assert(strcmp(o2, "321") == 0); assert(ReverseString(t3, &o3) == 1); assert(o3[0] == '\0'); free(o1); free(o2); free(o3); return EXIT_SUCCESS; }