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

Unified Diff: test/AppInfoJsObject.cpp

Issue 29417624: Issue 5034 - Part 4: JsEngine::Evaluate() return a JsValue (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Rebased on top of part 3 Created April 20, 2017, 12:41 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
« no previous file with comments | « src/Notification.cpp ('k') | test/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/AppInfoJsObject.cpp
===================================================================
--- a/test/AppInfoJsObject.cpp
+++ b/test/AppInfoJsObject.cpp
@@ -23,27 +23,27 @@
AdblockPlus::AppInfo appInfo;
appInfo.version = "1";
appInfo.name = "3";
appInfo.application = "4";
appInfo.applicationVersion = "5";
appInfo.locale = "2";
appInfo.developmentBuild = true;
AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New(appInfo));
- ASSERT_EQ("1", jsEngine->Evaluate("_appInfo.version")->AsString());
- ASSERT_EQ("3", jsEngine->Evaluate("_appInfo.name")->AsString());
- ASSERT_EQ("4", jsEngine->Evaluate("_appInfo.application")->AsString());
- ASSERT_EQ("5", jsEngine->Evaluate("_appInfo.applicationVersion")->AsString());
- ASSERT_EQ("2", jsEngine->Evaluate("_appInfo.locale")->AsString());
- ASSERT_TRUE(jsEngine->Evaluate("_appInfo.developmentBuild")->AsBool());
+ ASSERT_EQ("1", jsEngine->Evaluate("_appInfo.version").AsString());
+ ASSERT_EQ("3", jsEngine->Evaluate("_appInfo.name").AsString());
+ ASSERT_EQ("4", jsEngine->Evaluate("_appInfo.application").AsString());
+ ASSERT_EQ("5", jsEngine->Evaluate("_appInfo.applicationVersion").AsString());
+ ASSERT_EQ("2", jsEngine->Evaluate("_appInfo.locale").AsString());
+ ASSERT_TRUE(jsEngine->Evaluate("_appInfo.developmentBuild").AsBool());
}
TEST(AppInfoJsObjectTest, DefaultPropertyValues)
{
AdblockPlus::AppInfo appInfo;
AdblockPlus::JsEnginePtr jsEngine(AdblockPlus::JsEngine::New(appInfo));
- ASSERT_EQ("", jsEngine->Evaluate("_appInfo.version")->AsString());
- ASSERT_EQ("", jsEngine->Evaluate("_appInfo.name")->AsString());
- ASSERT_EQ("", jsEngine->Evaluate("_appInfo.application")->AsString());
- ASSERT_EQ("", jsEngine->Evaluate("_appInfo.applicationVersion")->AsString());
- ASSERT_EQ("", jsEngine->Evaluate("_appInfo.locale")->AsString());
- ASSERT_FALSE(jsEngine->Evaluate("_appInfo.developmentBuild")->AsBool());
+ ASSERT_EQ("", jsEngine->Evaluate("_appInfo.version").AsString());
+ ASSERT_EQ("", jsEngine->Evaluate("_appInfo.name").AsString());
+ ASSERT_EQ("", jsEngine->Evaluate("_appInfo.application").AsString());
+ ASSERT_EQ("", jsEngine->Evaluate("_appInfo.applicationVersion").AsString());
+ ASSERT_EQ("", jsEngine->Evaluate("_appInfo.locale").AsString());
+ ASSERT_FALSE(jsEngine->Evaluate("_appInfo.developmentBuild").AsBool());
}
« no previous file with comments | « src/Notification.cpp ('k') | test/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld