20 #ifndef CXXTEST_RUNNING
21 #define CXXTEST_RUNNING
23 #define _CXXTEST_HAVE_STD
25 #include "precompiled.h"
30 #include <cxxtest/GlobalFixture.h>
78 setlocale(LC_CTYPE,
"UTF-8");
103 return str1.find(str2) != str1.npos;
127 ifc.RegisterFunction<void, std::wstring,
script_TS_FAIL>(
"TS_FAIL");
132 std::ifstream ifs(
OsString(path).c_str());
134 std::string content((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
135 bool ok = ifc.
LoadScript(L
"test_setup.js", content);
void ScriptTestSetup(ScriptInterface &)
void script_TS_FAIL(void *, std::wstring msg)
static MiscSetup miscSetup
static void ShutDown()
Shut down the JS system to clean up memory.
bool LoadScript(const VfsPath &filename, const std::string &code)
Load and execute the given script in a new function scope.
virtual bool setUpWorld()
virtual bool tearDownWorld()
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
void wdbg_heap_Enable(bool enable)
enable or disable manual and automatic heap validity checking.
New profiler (complementing the older CProfileManager)
void timer_LatchStartTime()
timer_Time will subsequently return values relative to the current time.
void SetMainThread()
Set the current thread as the 'main' thread.
void Initialise()
Call in main thread to set up the profiler, before calling any other profiler functions.
bool ts_str_contains(const std::wstring &str1, const std::wstring &str2)
void Shutdown()
Call in main thread to shut everything down.
OsPath sys_ExecutablePathname()
static LeakReporter leakReporter
virtual bool tearDownWorld()
Abstraction around a SpiderMonkey JSContext.
virtual bool setUpWorld()
static std::string OsString(const OsPath &path)