diff options
Diffstat (limited to 'indra/newview/tests')
-rw-r--r-- | indra/newview/tests/lldateutil_test.cpp | 10 | ||||
-rw-r--r-- | indra/newview/tests/lllogininstance_test.cpp | 6 | ||||
-rw-r--r-- | indra/newview/tests/llviewerhelputil_test.cpp | 14 | ||||
-rw-r--r-- | indra/newview/tests/llxmlrpclistener_test.cpp | 2 |
4 files changed, 28 insertions, 4 deletions
diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp index 142a5eb5e6..7ba82fbd2c 100644 --- a/indra/newview/tests/lldateutil_test.cpp +++ b/indra/newview/tests/lldateutil_test.cpp @@ -179,4 +179,14 @@ namespace tut LLDateUtil::ageFromDate("12/31/2009", mNow), "Joined today" ); } + + template<> template<> + void dateutil_object_t::test<5>() + { + set_test_name("2010 rollover"); + LLDate now(std::string("2010-01-04T12:00:00Z")); + ensure_equals("days", + LLDateUtil::ageFromDate("12/13/2009", now), + "3 weeks old" ); + } } diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 7b28a3b72c..ef93586c6e 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -2,7 +2,7 @@ * @file lllogininstance_test.cpp * @brief Test for lllogininstance.cpp. * - * $LicenseInfo:firstyear=2008&license=internal$ + * $LicenseInfo:firstyear=2008&license=viewergpl$ * Copyright (c) 2008, Linden Research, Inc. * $/LicenseInfo$ */ @@ -56,9 +56,9 @@ void LLLogin::disconnect() //----------------------------------------------------------------------------- #include "../llviewernetwork.h" -unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {'1','2','3','4','5','6'}; /* Flawfinder: ignore */ +unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {'1','2','3','4','5','6'}; -LLViewerLogin::LLViewerLogin() {} +LLViewerLogin::LLViewerLogin() : mGridChoice(GRID_INFO_NONE) {} LLViewerLogin::~LLViewerLogin() {} void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const { diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index ec612c4606..eecc79d36c 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -78,9 +78,22 @@ static void substitute_string(std::string &input, const std::string &search, con } } +class LLAgent +{ +public: + LLAgent() {} + ~LLAgent() {} +#ifdef __GNUC__ + __attribute__ ((noinline)) +#endif + bool isGodlike() const { return FALSE; } +}; +LLAgent gAgent; + std::string LLWeb::expandURLSubstitutions(const std::string &url, const LLSD &default_subs) { + (void)gAgent.isGodlike(); // ref symbol to stop compiler from stripping it std::string new_url = url; substitute_string(new_url, "[TOPIC]", default_subs["TOPIC"].asString()); substitute_string(new_url, "[VERSION]", gVersion); @@ -91,6 +104,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, return new_url; } + //---------------------------------------------------------------------------- namespace tut diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp index c94ba0a3e8..c2c7e963b9 100644 --- a/indra/newview/tests/llxmlrpclistener_test.cpp +++ b/indra/newview/tests/llxmlrpclistener_test.cpp @@ -4,7 +4,7 @@ * @date 2009-03-20 * @brief Test for llxmlrpclistener. * - * $LicenseInfo:firstyear=2009&license=internal$ + * $LicenseInfo:firstyear=2009&license=viewergpl$ * Copyright (c) 2009, Linden Research, Inc. * $/LicenseInfo$ */ |