summaryrefslogtreecommitdiff
path: root/indra/newview/tests
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/tests')
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp53
-rw-r--r--indra/newview/tests/llversioninfo_test.cpp17
2 files changed, 36 insertions, 34 deletions
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 978678a09c..2edad30493 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -31,12 +31,16 @@
#include "../llviewernetwork.h"
#include "../lllogininstance.h"
+ // Needed for Auth Test
+ #include "../llhasheduniqueid.h"
+
// STL headers
// std headers
// external library headers
// other Linden headers
#include "../test/lltut.h"
#include "llevents.h"
+#include "llnotificationsutil.h"
#if defined(LL_WINDOWS)
#pragma warning(disable: 4355) // using 'this' in base-class ctor initializer expr
@@ -109,6 +113,19 @@ void LLCredential::authenticatorType(std::string &idType)
{
}
+LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
+ const LLSD& substitutions,
+ const LLSD& payload,
+ boost::function<void (const LLSD&, const LLSD&)> functor)
+{
+ return LLNotificationPtr((LLNotification*)NULL);
+}
+
+LLNotificationPtr LLNotificationsUtil::add(const std::string& name, const LLSD& args)
+{
+ return LLNotificationPtr((LLNotification*)NULL);
+}
+
//-----------------------------------------------------------------------------
#include "../llviewernetwork.h"
LLGridManager::~LLGridManager()
@@ -188,35 +205,6 @@ void LLUIColorTable::saveUserSettings(void)const {}
const std::string &LLVersionInfo::getVersion() { return VIEWERLOGIN_VERSION; }
const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; }
-//-----------------------------------------------------------------------------
-#include "../llappviewer.h"
-void LLAppViewer::forceQuit(void) {}
-LLAppViewer * LLAppViewer::sInstance = 0;
-
-//-----------------------------------------------------------------------------
-#include "llupdaterservice.h"
-
-std::string const & LLUpdaterService::pumpName(void)
-{
- static std::string wakka = "wakka wakka wakka";
- return wakka;
-}
-bool LLUpdaterService::updateReadyToInstall(void) { return false; }
-void LLUpdaterService::initialize(const std::string& channel,
- const std::string& version,
- const std::string& platform,
- const std::string& platform_version,
- const unsigned char uniqueid[MD5HEX_STR_SIZE],
- const bool& willing_to_test
- ) {}
-
-void LLUpdaterService::setCheckPeriod(unsigned int seconds) {}
-void LLUpdaterService::startChecking(bool install_if_ready) {}
-void LLUpdaterService::stopChecking() {}
-bool LLUpdaterService::isChecking() { return false; }
-LLUpdaterService::eUpdaterState LLUpdaterService::getState() { return INITIAL; }
-std::string LLUpdaterService::updatedVersion() { return ""; }
-
bool llHashedUniqueID(unsigned char* id)
{
memcpy( id, "66666666666666666666666666666666", MD5HEX_STR_SIZE );
@@ -224,6 +212,11 @@ bool llHashedUniqueID(unsigned char* id)
}
//-----------------------------------------------------------------------------
+#include "../llappviewer.h"
+void LLAppViewer::forceQuit(void) {}
+LLAppViewer * LLAppViewer::sInstance = 0;
+
+//-----------------------------------------------------------------------------
#include "llnotifications.h"
#include "llfloaterreg.h"
static std::string gTOSType;
@@ -339,7 +332,6 @@ namespace tut
gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO);
- gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO);
@@ -477,5 +469,4 @@ namespace tut
logininstance->connect(test_uri, agentCredential);
ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false);
}
-
}
diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp
index 6b0be29c2d..2f7a4e9601 100644
--- a/indra/newview/tests/llversioninfo_test.cpp
+++ b/indra/newview/tests/llversioninfo_test.cpp
@@ -29,6 +29,15 @@
#include "../llversioninfo.h"
+ #include <iostream>
+
+// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The
+// macro expands to the string name of the channel, but without quotes. We
+// need to turn it into a quoted string. This macro trick does that.
+#define stringize_inner(x) #x
+#define stringize_outer(x) stringize_inner(x)
+#define ll_viewer_channel stringize_outer(LL_VIEWER_CHANNEL)
+
namespace tut
{
struct versioninfo
@@ -50,7 +59,7 @@ namespace tut
mShortVersion = stream.str();
stream.str("");
- stream << LL_VIEWER_CHANNEL
+ stream << ll_viewer_channel
<< " "
<< mVersion;
mVersionAndChannel = stream.str();
@@ -74,7 +83,9 @@ namespace tut
template<> template<>
void versioninfo_object_t::test<1>()
- {
+ {
+ std::cout << "What we parsed from CMake: " << LL_VIEWER_VERSION_BUILD << std::endl;
+ std::cout << "What we get from llversioninfo: " << LLVersionInfo::getBuild() << std::endl;
ensure_equals("Major version",
LLVersionInfo::getMajor(),
LL_VIEWER_VERSION_MAJOR);
@@ -89,7 +100,7 @@ namespace tut
LL_VIEWER_VERSION_BUILD);
ensure_equals("Channel version",
LLVersionInfo::getChannel(),
- LL_VIEWER_CHANNEL);
+ ll_viewer_channel);
ensure_equals("Version String",
LLVersionInfo::getVersion(),
mVersion);