Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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");
}
Ejemplo n.º 3
0
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");
}
Ejemplo n.º 4
0
char* RepeatedTest_name(RepeatedTest* self)
{
	return Test_name(self->test);
}
Ejemplo n.º 5
0
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);
}
Ejemplo n.º 6
0
static void TextOutputter_printSuccessful(OutputterRef self,TestRef test,int runCount)
{
    (void)self;
    fprintf(stdout,"%d) OK %s\n", runCount, Test_name(test));
}
Ejemplo n.º 7
0
static void TextOutputter_printStartTest(OutputterRef self,TestRef test)
{
    (void)self;
    fprintf(stdout,"- %s\n",Test_name(test));
}
Ejemplo n.º 8
0
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");
}
Ejemplo n.º 9
0
static void XMLOutputter_printEndTest(OutputterRef self,TestRef test)
{
	fprintf(stdout,"</%s>\n",Test_name(test));
}