Corrected syntax in Test Cases

Corrected the syntax in all methods in test.c. Correctly malloc space for test string and freeing the space for testOutput string.