Index: test/JsEngine.cpp |
=================================================================== |
--- a/test/JsEngine.cpp |
+++ b/test/JsEngine.cpp |
@@ -45,27 +45,27 @@ public: |
TEST(JsEngineTest, EvaluateAndCall) |
{ |
ThrowingFileReader fileReader; |
ThrowingErrorCallback errorCallback; |
AdblockPlus::JsEngine jsEngine(&fileReader, 0, &errorCallback); |
const std::string source = "function hello() { return 'Hello'; }"; |
jsEngine.Evaluate(source); |
- const std::string result = jsEngine.Call("hello"); |
+ const std::string result = jsEngine.Evaluate("hello()"); |
ASSERT_EQ("Hello", result); |
} |
TEST(JsEngineTest, LoadAndCall) |
{ |
StubFileReader fileReader; |
ThrowingErrorCallback errorCallback; |
AdblockPlus::JsEngine jsEngine(&fileReader, 0, &errorCallback); |
jsEngine.Load("hello.js"); |
- const std::string result = jsEngine.Call("hello"); |
+ const std::string result = jsEngine.Evaluate("hello()"); |
ASSERT_EQ("Hello", result); |
} |
TEST(JsEngineTest, LoadBadStreamFails) |
{ |
BadFileReader fileReader; |
ThrowingErrorCallback errorCallback; |
AdblockPlus::JsEngine jsEngine(&fileReader, 0, &errorCallback); |