From 9158e4581a57e74683eed47006cfab7146e4c009 Mon Sep 17 00:00:00 2001
From: Cinders <cinder@cinderblocks.biz>
Date: Tue, 4 Aug 2015 12:55:38 -0600
Subject: [PATCH] Get tests passing again (shoot me)

---
 indra/newview/tests/llslurl_test.cpp         |  7 ++++-
 indra/newview/tests/llviewernetwork_test.cpp | 28 +++++++++++---------
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 923afb992c..6d21e689b6 100755
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -29,8 +29,10 @@
 #include "../llviewernetwork.h"
 #include "../test/lltut.h"
 #include "../llslurl.h"
+#include "llxmlnode.h"
 #include "../../llxml/llcontrol.h"
 #include "llsdserialize.h"
+#include "llnotificationsutil.h"
 
 namespace
 {
@@ -50,7 +52,10 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
                                    LLControlVariable::ePersist persist) {return NULL;}
-void LLControlGroup::setString(const std::string& name, const std::string& val){}
+void LLControlGroup::setString(const std::string& name, const std::string& val) {}
+LLNotificationPtr LLNotificationsUtil::add(const std::string& name, const LLSD& substitutions) { return NULL; }
+bool LLXMLNode::parseStream(std::istream& str, LLXMLNodePtr& node, LLXMLNode* defaults) { return true; }
+
 
 std::string gCmdLineLoginURI;
 std::string gCmdLineGridChoice;
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index e04b4d22b0..6e37ec52ca 100755
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -30,6 +30,8 @@
 #include "../test/lltut.h"
 #include "../../llxml/llcontrol.h"
 #include "llfile.h"
+#include "llxmlnode.h"
+#include "llnotificationsutil.h"
 
 namespace
 {
@@ -48,7 +50,9 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& initial_val,
                                    const std::string& comment,
                                    LLControlVariable::ePersist persist) {return NULL;}
-void LLControlGroup::setString(const std::string& name, const std::string& val){}
+void LLControlGroup::setString(const std::string& name, const std::string& val) {}
+LLNotificationPtr LLNotificationsUtil::add(const std::string& name, const LLSD& substitutions) { return NULL; }
+bool LLXMLNode::parseStream(std::istream& str, LLXMLNodePtr& node, LLXMLNode* defaults) { return true; }
 
 std::string gCmdLineLoginURI;
 std::string gCmdLineGridChoice;
@@ -183,10 +187,10 @@ namespace tut
 		ensure_equals("Known grids is a string-string map of size 2", known_grids.size(), 2);
 		ensure_equals("Agni has the right name and label",
 					  known_grids[std::string("util.agni.lindenlab.com")],
-					  std::string("Second Life Main Grid (Agni)"));
+					  std::string("Second Life"));
 		ensure_equals("Aditi has the right name and label",
 					  known_grids[std::string("util.aditi.lindenlab.com")],
-					  std::string("Second Life Beta Test Grid (Aditi)"));
+					  std::string("Second Life Beta"));
 		ensure_equals("name for agni",
 					  LLGridManager::getInstance()->getGrid("util.agni.lindenlab.com"),
 					  std::string("util.agni.lindenlab.com"));
@@ -198,7 +202,7 @@ namespace tut
 					  LLGridManager::getInstance()->getUpdateServiceURL());
 		ensure_equals("label for agni",
 					  LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
-					  std::string("Second Life Main Grid (Agni)"));
+					  std::string("Second Life"));
 
 		std::vector<std::string> login_uris;
 		LLGridManager::getInstance()->getLoginURIs(std::string("util.agni.lindenlab.com"), login_uris);
@@ -223,7 +227,7 @@ namespace tut
 					  std::string("Aditi"));
 		ensure_equals("label for aditi",
 					  LLGridManager::getInstance()->getGridLabel("util.aditi.lindenlab.com"),
-					  std::string("Second Life Beta Test Grid (Aditi)"));
+					  std::string("Second Life Beta"));
 
 		LLGridManager::getInstance()->getLoginURIs(std::string("util.aditi.lindenlab.com"), login_uris);
 
@@ -257,10 +261,10 @@ namespace tut
 		// Verify that Agni and Aditi were not overwritten
 		ensure_equals("Agni has the right name and label",
 					  known_grids[std::string("util.agni.lindenlab.com")], 
-					  std::string("Second Life Main Grid (Agni)"));
+					  std::string("Second Life"));
 		ensure_equals("Aditi has the right name and label",
 					  known_grids[std::string("util.aditi.lindenlab.com")], 
-					  std::string("Second Life Beta Test Grid (Aditi)"));
+					  std::string("Second Life Beta"));
 		ensure_equals("name for agni",
 					  LLGridManager::getInstance()->getGrid("util.agni.lindenlab.com"),
 					  std::string("util.agni.lindenlab.com"));
@@ -272,7 +276,7 @@ namespace tut
 					  LLGridManager::getInstance()->getUpdateServiceURL());
 		ensure_equals("label for agni",
 					  LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
-					  std::string("Second Life Main Grid (Agni)"));
+					  std::string("Second Life"));
 		std::vector<std::string> login_uris;
 		LLGridManager::getInstance()->getLoginURIs(std::string("util.agni.lindenlab.com"), login_uris);
 		ensure_equals("Number of login uris for agni", 1, login_uris.size());
@@ -296,7 +300,7 @@ namespace tut
 					  std::string("Aditi"));
 		ensure_equals("label for aditi",
 					  LLGridManager::getInstance()->getGridLabel("util.aditi.lindenlab.com"),
-					  std::string("Second Life Beta Test Grid (Aditi)"));
+					  std::string("Second Life Beta"));
 
 		LLGridManager::getInstance()->getLoginURIs(std::string("util.aditi.lindenlab.com"), login_uris);
 		ensure_equals("Number of login uris for aditi", 1, login_uris.size());
@@ -385,7 +389,7 @@ namespace tut
 		LLGridManager::getInstance()->setGridChoice("util.agni.lindenlab.com");
 		ensure_equals("getGridLabel",
 					  LLGridManager::getInstance()->getGridLabel(),
-					  std::string("Second Life Main Grid (Agni)"));
+					  std::string("Second Life"));
 		ensure_equals("getGridId",
 					  LLGridManager::getInstance()->getGridId(),
 					  std::string("Agni"));
@@ -402,7 +406,7 @@ namespace tut
 					  std::string("https://update.secondlife.com/update"),
 					  LLGridManager::getInstance()->getUpdateServiceURL());
 		ensure("Is Agni Second Life", LLGridManager::getInstance()->isInSecondlife());
-		ensure("Agni is NOT OpenSim", LLGridManager::getInstance()->isInOpenSim());
+		ensure("Agni is NOT OpenSim", !LLGridManager::getInstance()->isInOpenSim());
 		std::vector<std::string> uris;
 		LLGridManager::getInstance()->getLoginURIs(uris);
 		ensure_equals("getLoginURIs size", 1, uris.size());
@@ -422,7 +426,7 @@ namespace tut
 		ensure("alternative grid is OpenSim",
 			   LLGridManager::getInstance()->isInOpenSim());
 		ensure("alternative grid is not Second Life",
-			   LLGridManager::getInstance()->isInSecondlife());
+			   !LLGridManager::getInstance()->isInSecondlife());
 	}
 
 }
-- 
GitLab