This source file includes following definitions.
- MojoTestSupportLogPerfResult
- Init
- Get
- Reset
#include "mojo/public/tests/test_support_private.h"
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
static mojo::test::TestSupport* g_test_support = NULL;
extern "C" {
void MojoTestSupportLogPerfResult(const char* test_name,
double value,
const char* units) {
if (g_test_support)
g_test_support->LogPerfResult(test_name, value, units);
else
printf("[no test runner]\t%s\t%g\t%s\n", test_name, value, units);
}
}
namespace mojo {
namespace test {
TestSupport::~TestSupport() {
}
void TestSupport::Init(TestSupport* test_support) {
assert(!g_test_support);
g_test_support = test_support;
}
TestSupport* TestSupport::Get() {
return g_test_support;
}
void TestSupport::Reset() {
g_test_support = NULL;
}
}
}