forked from 0ad/0ad
Replace strictness test by a different one, as the old test wasn't considered non-strict anymore.
This was SVN commit r15134.
This commit is contained in:
parent
955e6e788a
commit
8cec641156
@ -47,8 +47,9 @@ public:
|
||||
{
|
||||
ScriptInterface script("Test", "Test", g_ScriptRuntime);
|
||||
TestLogger logger;
|
||||
TS_ASSERT(script.LoadScript(L"test.js", "1+1;"));
|
||||
TS_ASSERT_WSTR_CONTAINS(logger.GetOutput(), L"JavaScript warning: test.js line 1\nuseless expression");
|
||||
// in strict mode, this inside a function doesn't point to the global object
|
||||
TS_ASSERT(script.LoadScript(L"test.js", "var isStrict = (function() { return !this; })();warn('isStrict is '+isStrict);"));
|
||||
TS_ASSERT_WSTR_CONTAINS(logger.GetOutput(), L"WARNING: isStrict is true");
|
||||
}
|
||||
|
||||
void test_loadscript_strict_error()
|
||||
|
Loading…
Reference in New Issue
Block a user