Index: test/AppInfoJsObject.cpp |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/test/AppInfoJsObject.cpp |
@@ -0,0 +1,16 @@ |
+#include <AdblockPlus.h> |
+#include <gtest/gtest.h> |
+ |
+TEST(AppInfoJsObjectTest, AllProperties) |
+{ |
+ AdblockPlus::AppInfo appInfo; |
+ appInfo.id = "1"; |
+ appInfo.version = "2"; |
+ appInfo.name = "4"; |
+ appInfo.platform = "5"; |
+ AdblockPlus::JsEngine jsEngine(appInfo, 0, 0, 0); |
+ ASSERT_EQ("1", jsEngine.Evaluate("_appInfo.id")->AsString()); |
+ ASSERT_EQ("2", jsEngine.Evaluate("_appInfo.version")->AsString()); |
+ ASSERT_EQ("4", jsEngine.Evaluate("_appInfo.name")->AsString()); |
+ ASSERT_EQ("5", jsEngine.Evaluate("_appInfo.platform")->AsString()); |
+} |