static void ColorOutputter_printFailure(OutputterRef self, TestRef test, char *msg, int line, char *file, int runCount) { (void) self; (void) runCount; printf("\n" CRED "FAILED %s (%s:%d) %s" CDEFAULT "\n", Test_name(test), file, line, msg); }
static void TestRunner_addFailure(TestListner* self,Test* test,char* msg,int line,char* file) { stdimpl_print("\r\n"); stdimpl_print(Test_name(root_)); stdimpl_print("."); stdimpl_print(Test_name(test)); { char buf[16]; stdimpl_print(" ("); stdimpl_print(file); stdimpl_print(" "); stdimpl_itoa(line, buf, 10); stdimpl_print(buf); stdimpl_print(") "); } stdimpl_print(msg); stdimpl_print("\r\n"); }
static void XMLOutputter_printFailure(OutputterRef self,TestRef test,char *msg,int line,char *file,int runCount) { fprintf(stdout,"<FailedTest id=\"%d\">\n",runCount); fprintf(stdout,"<Name>%s</Name>\n",Test_name(test)); fprintf(stdout,"<Location>\n"); fprintf(stdout,"<File>%s</File>\n",file); fprintf(stdout,"<Line>%d</Line>\n",line); fprintf(stdout,"</Location>\n"); fprintf(stdout,"<Message>%s</Message>\n",msg); fprintf(stdout,"</FailedTest>\n"); }
char* RepeatedTest_name(RepeatedTest* self) { return Test_name(self->test); }
static void TextOutputter_printFailure(OutputterRef self,TestRef test,char *msg,int line,char *file,int runCount) { (void)self; fprintf(stdout,"%d) NG %s (%s %d) %s\n", runCount, Test_name(test), file, line, msg); }
static void TextOutputter_printSuccessful(OutputterRef self,TestRef test,int runCount) { (void)self; fprintf(stdout,"%d) OK %s\n", runCount, Test_name(test)); }
static void TextOutputter_printStartTest(OutputterRef self,TestRef test) { (void)self; fprintf(stdout,"- %s\n",Test_name(test)); }
static void XMLOutputter_printSuccessful(OutputterRef self,TestRef test,int runCount) { fprintf(stdout,"<Test id=\"%d\">\n",runCount); fprintf(stdout,"<Name>%s</Name>\n",Test_name(test)); fprintf(stdout,"</Test>\n"); }
static void XMLOutputter_printEndTest(OutputterRef self,TestRef test) { fprintf(stdout,"</%s>\n",Test_name(test)); }