tools/testy/TestySupport.cpp
author Benjamin Smedberg <benjamin@smedbergs.us>
Tue, 22 Sep 2009 09:05:48 -0400
changeset 32951 1c4751f81b1d5665ece3d21c5862b16973897ae4
parent 1 9b2a99adc05e53cd4010de512f50118594756650
child 77799 e7854b4d29ba905ae3994f821b160c989bac4260
permissions -rw-r--r--
Bug 485409 - Handle a Windows-style path as $srcdir in configure, by modifying the default autoconf M4 macros so that they recognize Z:/ as an absolute path. r=ted

#include "nspr.h"
#include "TestySupport.h"

FILE* gLogFile = NULL;

int Testy_LogInit(const char* fileName)
{
  gLogFile = fopen(fileName, "w+b");
  if (!gLogFile) return -1;
  return 0;
}

void Testy_LogShutdown()
{
  if (gLogFile)
    fclose(gLogFile);
}


void Testy_LogStart(const char* name)
{
  PR_ASSERT(gLogFile);
  fprintf(gLogFile, "Test Case: %s", name);
  fflush(gLogFile);
}

void Testy_LogComment(const char* name, const char* comment)
{
  PR_ASSERT(gLogFile);
  fprintf(gLogFile, "Test Case: %s\n\t%s", name, comment);
  fflush(gLogFile);
}

void Testy_LogEnd(const char* name, PRBool passed)
{
  PR_ASSERT(gLogFile);
  fprintf(gLogFile, "Test Case: %s (%s)", name, passed ? "Passed" : "Failed");
  fflush(gLogFile);
}

void Testy_GenericStartup()
{
  
}

void Testy_GenericShutdown()
{
  
}