Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/JsValue.cpp

Issue 29334678: Issue 3589 - Change return type of AdblockPlus::JsValue::Call from pointer to r-value object. (Closed)
Patch Set: rebase Created March 27, 2017, 9:47 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/Notification.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/JsValue.cpp
diff --git a/test/JsValue.cpp b/test/JsValue.cpp
index f6edd20131082fe1ba8e3338c7e11823357c674e..44db3bae635f39a7d6916a90806d20bde58f19cd 100644
--- a/test/JsValue.cpp
+++ b/test/JsValue.cpp
@@ -202,13 +202,13 @@ TEST_F(JsValueTest, FunctionValue)
AdblockPlus::JsConstValueList params;
params.push_back(jsEngine->NewValue(5));
params.push_back(jsEngine->NewValue("xyz"));
- ASSERT_EQ("2/5/xyz", value->Call(params, thisPtr)->AsString());
+ ASSERT_EQ("2/5/xyz", value->Call(params, thisPtr).AsString());
}
TEST_F(JsValueTest, JsValueCallSingleArg)
{
auto func = jsEngine->Evaluate("(function(arg) {return arg * 2;})");
- EXPECT_EQ(10, func->Call(jsEngine->NewValue(5))->AsInt());
+ EXPECT_EQ(10, func->Call(*jsEngine->NewValue(5)).AsInt());
}
TEST_F(JsValueTest, ThrowingCoversion)
« no previous file with comments | « src/Notification.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld