mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 01:52:16 +00:00
Rename ScriptRuntime to ScriptContext
SM52 essentially replaces JSRuntime with JSContext (though JSContext itself was replaced with JSCompartment). To prepare for this migration, rename all Runtime-related things to Context. Part of the SM52 migration, stage: SM45 compatible. Patch by: Itms Refs #4893 Differential Revision: https://code.wildfiregames.com/D3091 This was SVN commit r24181.
This commit is contained in:
@@ -33,7 +33,7 @@ class TestScriptConversions : public CxxTest::TestSuite
|
||||
template <typename T>
|
||||
void convert_to(const T& value, const std::string& expected)
|
||||
{
|
||||
ScriptInterface script("Test", "Test", g_ScriptRuntime);
|
||||
ScriptInterface script("Test", "Test", g_ScriptContext);
|
||||
TS_ASSERT(script.LoadGlobalScripts());
|
||||
ScriptInterface::Request rq(script);
|
||||
|
||||
@@ -52,7 +52,7 @@ class TestScriptConversions : public CxxTest::TestSuite
|
||||
template <typename T>
|
||||
void roundtrip(const T& value, const char* expected)
|
||||
{
|
||||
ScriptInterface script("Test", "Test", g_ScriptRuntime);
|
||||
ScriptInterface script("Test", "Test", g_ScriptContext);
|
||||
TS_ASSERT(script.LoadGlobalScripts());
|
||||
ScriptInterface::Request rq(script);
|
||||
|
||||
@@ -74,7 +74,7 @@ class TestScriptConversions : public CxxTest::TestSuite
|
||||
template <typename T>
|
||||
void call_prototype_function(const T& u, const T& v, const std::string& func, const std::string& expected)
|
||||
{
|
||||
ScriptInterface script("Test", "Test", g_ScriptRuntime);
|
||||
ScriptInterface script("Test", "Test", g_ScriptContext);
|
||||
TS_ASSERT(script.LoadGlobalScripts());
|
||||
ScriptInterface::Request rq(script);
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
|
||||
void test_integers()
|
||||
{
|
||||
ScriptInterface script("Test", "Test", g_ScriptRuntime);
|
||||
ScriptInterface script("Test", "Test", g_ScriptContext);
|
||||
ScriptInterface::Request rq(script);
|
||||
|
||||
// using new uninitialized variables each time to be sure the test doesn't succeeed if ToJSVal doesn't touch the value at all.
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
roundtrip<float>(-std::numeric_limits<float>::infinity(), "-Infinity");
|
||||
convert_to<float>(std::numeric_limits<float>::quiet_NaN(), "NaN"); // can't use roundtrip since nan != nan
|
||||
|
||||
ScriptInterface script("Test", "Test", g_ScriptRuntime);
|
||||
ScriptInterface script("Test", "Test", g_ScriptContext);
|
||||
ScriptInterface::Request rq(script);
|
||||
|
||||
float f = 0;
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
void test_utf8utf16_conversion()
|
||||
{
|
||||
// Fancier conversion: we store UTF8 and get UTF16 and vice-versa
|
||||
ScriptInterface script("Test", "Test", g_ScriptRuntime);
|
||||
ScriptInterface script("Test", "Test", g_ScriptContext);
|
||||
TS_ASSERT(script.LoadGlobalScripts());
|
||||
ScriptInterface::Request rq(script);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user