Fix for ARM build bustage (bug 593532 fallout, no_r=me).
[mozilla-central.git] / tools / testy / TestySupport.cpp
blob17c952ee94893fa4dd3f5fbc984b67d640f1810a
1 #include "nspr.h"
2 #include "TestySupport.h"
4 FILE* gLogFile = NULL;
6 int Testy_LogInit(const char* fileName)
8 gLogFile = fopen(fileName, "w+b");
9 if (!gLogFile) return -1;
10 return 0;
13 void Testy_LogShutdown()
15 if (gLogFile)
16 fclose(gLogFile);
20 void Testy_LogStart(const char* name)
22 PR_ASSERT(gLogFile);
23 fprintf(gLogFile, "Test Case: %s", name);
24 fflush(gLogFile);
27 void Testy_LogComment(const char* name, const char* comment)
29 PR_ASSERT(gLogFile);
30 fprintf(gLogFile, "Test Case: %s\n\t%s", name, comment);
31 fflush(gLogFile);
34 void Testy_LogEnd(const char* name, PRBool passed)
36 PR_ASSERT(gLogFile);
37 fprintf(gLogFile, "Test Case: %s (%s)", name, passed ? "Passed" : "Failed");
38 fflush(gLogFile);
41 void Testy_GenericStartup()
46 void Testy_GenericShutdown()