summaryrefslogtreecommitdiff
path: root/indra/newview/tests
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/tests')
-rw-r--r--indra/newview/tests/lldateutil_test.cpp10
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp7
-rw-r--r--indra/newview/tests/llslurl_test.cpp20
-rw-r--r--indra/newview/tests/llviewerassetstats_test.cpp5
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp12
-rw-r--r--indra/newview/tests/llworldmap_test.cpp6
6 files changed, 34 insertions, 26 deletions
diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp
index 151aadfd4b..3e2e5e70a2 100644
--- a/indra/newview/tests/lldateutil_test.cpp
+++ b/indra/newview/tests/lldateutil_test.cpp
@@ -34,16 +34,16 @@
#include "lltrans.h"
#include "llui.h"
-#include <map>
+#include <unordered_map>
// Baked-in return values for getString()
-std::map< std::string, std::string, std::less<>> gString;
+std::unordered_map< std::string, std::string, ll::string_hash, std::equal_to<>> gString;
// Baked-in return values for getCountString()
// map of pairs of input xml_desc and integer count
typedef std::pair< std::string, int > count_string_t;
-std::map< count_string_t, std::string > gCountString;
+std::map<count_string_t, std::string> gCountString;
std::string LLTrans::getString(const std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
{
@@ -57,12 +57,12 @@ std::string LLTrans::getString(const std::string_view xml_desc, const LLStringUt
return {};
}
-std::string LLTrans::getCountString(const std::string& language, const std::string& xml_desc, S32 count)
+std::string LLTrans::getCountString(std::string_view language, std::string_view xml_desc, S32 count)
{
count_string_t key(xml_desc, count);
if (gCountString.find(key) == gCountString.end())
{
- return std::string("Couldn't find ") + xml_desc;
+ return std::string("Couldn't find ") + static_cast<std::string>(xml_desc);
}
return gCountString[ count_string_t(xml_desc, count) ];
}
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index bff2289a7c..b00b89b9fd 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -66,6 +66,7 @@ static LLEventStream gTestPump("test_pump");
#include "../llstartup.h"
LLSLURL LLStartUp::sStartSLURL;
LLSLURL& LLStartUp::getStartSLURL() { return sStartSLURL; }
+std::string LLStartUp::getUserId() { return ""; };
#include "lllogin.h"
@@ -122,7 +123,7 @@ 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)
+ std::function<void (const LLSD&, const LLSD&)> functor)
{
return LLNotificationPtr((LLNotification*)NULL);
}
@@ -222,8 +223,6 @@ bool llHashedUniqueID(unsigned char* id)
//-----------------------------------------------------------------------------
#include "../llappviewer.h"
void LLAppViewer::forceQuit(void) {}
-bool LLAppViewer::isUpdaterMissing() { return true; }
-bool LLAppViewer::waitForUpdater() { return false; }
LLAppViewer * LLAppViewer::sInstance = 0;
//-----------------------------------------------------------------------------
@@ -252,7 +251,7 @@ void LLProgressView::setMessage(std::string const &){}
// LLNotifications
class MockNotifications : public LLNotificationsInterface
{
- boost::function<void (const LLSD&, const LLSD&)> mResponder;
+ std::function<void (const LLSD&, const LLSD&)> mResponder;
int mAddedCount;
public:
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index fc9f5b707a..3ff38ea372 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -177,15 +177,15 @@ namespace tut
LLSLURL slurl = LLSLURL("");
ensure_equals("null slurl", (int)slurl.getType(), LLSLURL::LAST_LOCATION);
- slurl = LLSLURL("http://slurl.com/secondlife/myregion");
+ slurl = LLSLURL("https://slurl.com/secondlife/myregion");
ensure_equals("slurl.com slurl, region only - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("slurl.com slurl, region only", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
- slurl = LLSLURL("http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ slurl = LLSLURL("https://maps.secondlife.com/secondlife/myregion/1/2/3");
ensure_equals("maps.secondlife.com slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("maps.secondlife.com slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("secondlife://");
ensure_equals("secondlife: slurl, empty - type", slurl.getType(), LLSLURL::EMPTY);
@@ -196,27 +196,27 @@ namespace tut
slurl = LLSLURL("secondlife://myregion");
ensure_equals("secondlife: slurl, region only - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("secondlife: slurl, region only", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
slurl = LLSLURL("secondlife://myregion/1/2/3");
ensure_equals("secondlife: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("secondlife slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("/myregion");
ensure_equals("/region slurl, region- type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("/region slurl, region ", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
slurl = LLSLURL("/myregion/1/2/3");
ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("/ slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("my region/1/2/3");
ensure_equals(" slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals(" slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/my%20region/1/2/3");
+ "https://maps.secondlife.com/secondlife/my%20region/1/2/3");
LLGridManager::getInstance()->setGridChoice("my.grid.com");
slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3");
@@ -309,7 +309,7 @@ namespace tut
slurl = LLSLURL("my region", LLVector3(1,2,3));
ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals(" default grid/region/vector", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/my%20region/1/2/3");
+ "https://maps.secondlife.com/secondlife/my%20region/1/2/3");
LLGridManager::getInstance()->setGridChoice("MyGrid");
slurl = LLSLURL("my region", LLVector3(1,2,3));
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index d5e281bba8..10c68432a1 100644
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -43,12 +43,15 @@ namespace LLStatViewer
LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample");
}
-void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars)
+void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars, S32& pending_meshes, S32& control_avatars)
{
counts.resize(3);
counts[0] = 0;
counts[1] = 0;
counts[2] = 1;
+ cloud_avatars = 0;
+ pending_meshes = 0;
+ control_avatars = 0;
}
// static
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index d9cb9e7538..1cbb8b50eb 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -236,7 +236,7 @@ namespace tut
std::string("https://secondlife.com/helpers/"));
ensure_equals("Agni login page",
LLGridManager::getInstance()->getLoginPage("util.agni.lindenlab.com"),
- std::string("https://viewer-splash.secondlife.com/"));
+ std::string("https://viewer-splash-v2.secondlife.com/"));
ensure("Agni is a system grid",
LLGridManager::getInstance()->isSystemGrid("util.agni.lindenlab.com"));
@@ -261,7 +261,7 @@ namespace tut
std::string("https://secondlife.aditi.lindenlab.com/helpers/"));
ensure_equals("Aditi login page",
LLGridManager::getInstance()->getLoginPage("util.aditi.lindenlab.com"),
- std::string("https://viewer-splash.secondlife.com/"));
+ std::string("https://viewer-splash-v2.secondlife.com/"));
ensure("Aditi is a system grid",
LLGridManager::getInstance()->isSystemGrid("util.aditi.lindenlab.com"));
}
@@ -309,7 +309,7 @@ namespace tut
std::string("https://secondlife.com/helpers/"));
ensure_equals("Agni login page",
LLGridManager::getInstance()->getLoginPage("util.agni.lindenlab.com"),
- std::string("https://viewer-splash.secondlife.com/"));
+ std::string("https://viewer-splash-v2.secondlife.com/"));
ensure("Agni is a system grid",
LLGridManager::getInstance()->isSystemGrid("util.agni.lindenlab.com"));
@@ -333,7 +333,7 @@ namespace tut
std::string("https://secondlife.aditi.lindenlab.com/helpers/"));
ensure_equals("Aditi login page",
LLGridManager::getInstance()->getLoginPage("util.aditi.lindenlab.com"),
- std::string("https://viewer-splash.secondlife.com/"));
+ std::string("https://viewer-splash-v2.secondlife.com/"));
ensure("Aditi is a system grid",
LLGridManager::getInstance()->isSystemGrid("util.aditi.lindenlab.com"));
@@ -391,7 +391,7 @@ namespace tut
std::string("https://minimal.long.name/helpers/"));
ensure_equals("minimal grid login page",
LLGridManager::getInstance()->getLoginPage("minimal.long.name"),
- std::string("http://minimal.long.name/app/login/"));
+ std::string("https://minimal.long.name/app/login/"));
}
@@ -422,7 +422,7 @@ namespace tut
std::string("https://secondlife.com/helpers/"));
ensure_equals("getLoginPage",
LLGridManager::getInstance()->getLoginPage(),
- std::string("https://viewer-splash.secondlife.com/"));
+ std::string("https://viewer-splash-v2.secondlife.com/"));
ensure_equals("update url base for Agni", // relies on agni being the default
std::string("https://update.secondlife.com/update"),
LLGridManager::getInstance()->getUpdateServiceURL());
diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp
index d5bf189d82..60172b3960 100644
--- a/indra/newview/tests/llworldmap_test.cpp
+++ b/indra/newview/tests/llworldmap_test.cpp
@@ -32,6 +32,7 @@
#include "lltrans.h"
#include "lluistring.h"
#include "../llviewertexture.h"
+#include "../llviewercontrol.h"
#include "../llworldmapmessage.h"
// Class to test
#include "../llworldmap.h"
@@ -71,6 +72,11 @@ void LLUIString::updateResult() const { }
void LLUIString::setArg(const std::string& , const std::string& ) { }
void LLUIString::assign(const std::string& ) { }
+LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) {}
+LLControlGroup::~LLControlGroup() {}
+bool LLControlGroup::getBOOL(std::string_view) { return true; }
+LLControlGroup gSavedSettings("test_settings");
+
// End Stubbing
// -------------------------------------------------------------------------------------------