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:
sanderd17 2014-05-08 13:26:21 +00:00
parent 955e6e788a
commit 8cec641156

View File

@ -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()