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

Unified Diff: test/JsValue.cpp

Issue 29410664: Issue 5013 - Use const JsValue and pass reference where applicable (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created April 12, 2017, 3:24 p.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
Index: test/JsValue.cpp
===================================================================
--- a/test/JsValue.cpp
+++ b/test/JsValue.cpp
@@ -151,17 +151,17 @@
ASSERT_FALSE(value->IsFunction());
ASSERT_EQ("foo", value->AsString());
ASSERT_EQ(123, value->AsInt());
ASSERT_TRUE(value->AsBool());
ASSERT_ANY_THROW(value->AsList());
ASSERT_EQ(2, value->GetProperty("x")->AsInt());
value->SetProperty("x", 12);
ASSERT_EQ(12, value->GetProperty("x")->AsInt());
- value->SetProperty("x", jsEngine->NewValue(15));
+ value->SetProperty("x", *jsEngine->NewValue(15));
ASSERT_EQ(15, value->GetProperty("x")->AsInt());
ASSERT_EQ("Foo", value->GetClass());
ASSERT_EQ(3u, value->GetOwnPropertyNames().size());
ASSERT_ANY_THROW(value->Call());
}
TEST_F(JsValueTest, ArrayValue)
{
« src/FilterEngine.cpp ('K') | « test/JsEngine.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld