Skip to content
Snippets Groups Projects
Commit de6b7802 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix tests

parent 3f0a9814
No related branches found
No related tags found
No related merge requests found
...@@ -101,19 +101,31 @@ bool LLAgentAccess::canAccessAdult() const ...@@ -101,19 +101,31 @@ bool LLAgentAccess::canAccessAdult() const
bool LLAgentAccess::prefersPG() const bool LLAgentAccess::prefersPG() const
{ {
#ifdef LL_TEST
U32 access = mSavedSettings.getU32("PreferredMaturity");
#else
U32 access = ALControlCache::PreferredMaturity; U32 access = ALControlCache::PreferredMaturity;
#endif
return access < SIM_ACCESS_MATURE; return access < SIM_ACCESS_MATURE;
} }
bool LLAgentAccess::prefersMature() const bool LLAgentAccess::prefersMature() const
{ {
#ifdef LL_TEST
U32 access = mSavedSettings.getU32("PreferredMaturity");
#else
U32 access = ALControlCache::PreferredMaturity; U32 access = ALControlCache::PreferredMaturity;
#endif
return access >= SIM_ACCESS_MATURE; return access >= SIM_ACCESS_MATURE;
} }
bool LLAgentAccess::prefersAdult() const bool LLAgentAccess::prefersAdult() const
{ {
#ifdef LL_TEST
U32 access = mSavedSettings.getU32("PreferredMaturity");
#else
U32 access = ALControlCache::PreferredMaturity; U32 access = ALControlCache::PreferredMaturity;
#endif
return access >= SIM_ACCESS_ADULT; return access >= SIM_ACCESS_ADULT;
} }
......
...@@ -65,7 +65,7 @@ U32 LLControlGroup::getU32(const std::string& name) ...@@ -65,7 +65,7 @@ U32 LLControlGroup::getU32(const std::string& name)
return test_preferred_maturity; return test_preferred_maturity;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
namespace tut namespace tut
{ {
struct agentaccess struct agentaccess
......
...@@ -159,7 +159,7 @@ const char *gSampleGridFile = ...@@ -159,7 +159,7 @@ const char *gSampleGridFile =
" <array>" " <array>"
" <string>myloginuri</string>" " <string>myloginuri</string>"
" </array>" " </array>"
" <key>update_query_url_base</key><string>https://update.secondlife.com/update</string>" " <key>update_query_url_base</key><string>https://app.alchemyviewer.org/update</string>"
" <key>keyname</key><string>util.foobar.lindenlab.com</string>" " <key>keyname</key><string>util.foobar.lindenlab.com</string>"
" </map>" " </map>"
" </map>" " </map>"
...@@ -219,7 +219,7 @@ namespace tut ...@@ -219,7 +219,7 @@ namespace tut
std::string("Agni"), std::string("Agni"),
LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com")); LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"));
ensure_equals("update url base for Agni", // relies on agni being the default ensure_equals("update url base for Agni", // relies on agni being the default
std::string("https://update.secondlife.com/update"), std::string("https://app.alchemyviewer.org/update"),
LLGridManager::getInstance()->getUpdateServiceURL()); LLGridManager::getInstance()->getUpdateServiceURL());
ensure_equals("label for agni", ensure_equals("label for agni",
LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"), LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
...@@ -293,7 +293,7 @@ namespace tut ...@@ -293,7 +293,7 @@ namespace tut
LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"), LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"),
std::string("Agni")); std::string("Agni"));
ensure_equals("update url base for Agni", // relies on agni being the default ensure_equals("update url base for Agni", // relies on agni being the default
std::string("https://update.secondlife.com/update"), std::string("https://app.alchemyviewer.org/update"),
LLGridManager::getInstance()->getUpdateServiceURL()); LLGridManager::getInstance()->getUpdateServiceURL());
ensure_equals("label for agni", ensure_equals("label for agni",
LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"), LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
...@@ -424,7 +424,7 @@ namespace tut ...@@ -424,7 +424,7 @@ namespace tut
LLGridManager::getInstance()->getLoginPage(), LLGridManager::getInstance()->getLoginPage(),
std::string("https://viewer-splash.secondlife.com/")); std::string("https://viewer-splash.secondlife.com/"));
ensure_equals("update url base for Agni", // relies on agni being the default ensure_equals("update url base for Agni", // relies on agni being the default
std::string("https://update.secondlife.com/update"), std::string("https://app.alchemyviewer.org/update"),
LLGridManager::getInstance()->getUpdateServiceURL()); LLGridManager::getInstance()->getUpdateServiceURL());
ensure("Is Agni a production grid", LLGridManager::getInstance()->isInProductionGrid()); ensure("Is Agni a production grid", LLGridManager::getInstance()->isInProductionGrid());
std::vector<std::string> uris; std::vector<std::string> uris;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment