diff options
Diffstat (limited to 'indra/test')
-rw-r--r-- | indra/test/CMakeLists.txt | 8 | ||||
-rwxr-xr-x | indra/test/lldoubledispatch_tut.cpp | 245 | ||||
-rw-r--r-- | indra/test/llhttpclient_tut.cpp | 4 | ||||
-rw-r--r-- | indra/test/llhttpdate_tut.cpp | 3 | ||||
-rw-r--r-- | indra/test/llpermissions_tut.cpp | 11 | ||||
-rw-r--r-- | indra/test/llsaleinfo_tut.cpp | 15 | ||||
-rw-r--r-- | indra/test/llscriptresource_tut.cpp | 7 | ||||
-rwxr-xr-x | indra/test/llsdmessagebuilder_tut.cpp | 50 | ||||
-rw-r--r-- | indra/test/lltimestampcache_tut.cpp | 7 | ||||
-rw-r--r-- | indra/test/lltranscode_tut.cpp | 7 | ||||
-rw-r--r-- | indra/test/test.h | 5 |
11 files changed, 302 insertions, 60 deletions
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 53109ca196..98ad8af02d 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -34,10 +34,13 @@ set(test_SOURCE_FILES io.cpp # llapp_tut.cpp # Temporarily removed until thread issues can be solved llbase64_tut.cpp + llbbox_tut.cpp + llbboxlocal_tut.cpp llblowfish_tut.cpp llbuffer_tut.cpp lldate_tut.cpp lldependencies_tut.cpp + lldoubledispatch_tut.cpp llerror_tut.cpp llevents_tut.cpp llhost_tut.cpp @@ -55,6 +58,7 @@ set(test_SOURCE_FILES llpipeutil.cpp llquaternion_tut.cpp llrandom_tut.cpp + llrect_tut.cpp llsaleinfo_tut.cpp llscriptresource_tut.cpp llsdmessagebuilder_tut.cpp @@ -69,6 +73,7 @@ set(test_SOURCE_FILES lltimestampcache_tut.cpp lltiming_tut.cpp lltranscode_tut.cpp + lltreeiterators_tut.cpp lltut.cpp lluri_tut.cpp lluuidhashmap_tut.cpp @@ -127,7 +132,10 @@ target_link_libraries(test ${APRICONV_LIBRARIES} ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} + ${BOOST_PROGRAM_OPTIONS_LIBRARY} + ${BOOST_REGEX_LIBRARY} ${DL_LIBRARY} + ${GOOGLE_PERFTOOLS_LIBRARIES} ) if (WINDOWS) diff --git a/indra/test/lldoubledispatch_tut.cpp b/indra/test/lldoubledispatch_tut.cpp new file mode 100755 index 0000000000..63ef4d4497 --- /dev/null +++ b/indra/test/lldoubledispatch_tut.cpp @@ -0,0 +1,245 @@ +/** + * @file lldoubledispatch_tut.cpp + * @author Nat Goodspeed + * @date 2008-11-13 + * @brief Test for lldoubledispatch.h + * + * This program tests the DoubleDispatch class, using a variation on the example + * from Scott Meyers' "More Effective C++", Item 31. + * + * $LicenseInfo:firstyear=2008&license=viewergpl$ + * + * Copyright (c) 2008-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "linden_common.h" +// associated header +#include "lldoubledispatch.h" +// STL headers +// std headers +#include <string> +#include <iostream> +#include <typeinfo> +// external library headers +// other Linden headers +#include "lltut.h" + + +/*---------------------------- Class hierarchy -----------------------------*/ +// All objects are GameObjects. +class GameObject +{ +public: + GameObject(const std::string& name): mName(name) {} + virtual ~GameObject() {} + virtual std::string stringize() { return std::string(typeid(*this).name()) + " " + mName; } + +protected: + std::string mName; +}; + +// SpaceStation, Asteroid and SpaceShip are peer GameObjects. +struct SpaceStation: public GameObject +{ + SpaceStation(const std::string& name): GameObject(name) {} + // Only a dummy SpaceStation is constructed without a name + SpaceStation(): GameObject("dummy") {} +}; + +struct Asteroid: public GameObject +{ + Asteroid(const std::string& name): GameObject(name) {} + Asteroid(): GameObject("dummy") {} +}; + +struct SpaceShip: public GameObject +{ + SpaceShip(const std::string& name): GameObject(name) {} + SpaceShip(): GameObject("dummy") {} +}; + +// SpaceShip is specialized further into CommercialShip and MilitaryShip. +struct CommercialShip: public SpaceShip +{ + CommercialShip(const std::string& name): SpaceShip(name) {} + CommercialShip(): SpaceShip("dummy") {} +}; + +struct MilitaryShip: public SpaceShip +{ + MilitaryShip(const std::string& name): SpaceShip(name) {} + MilitaryShip(): SpaceShip("dummy") {} +}; + +/*-------------------------- Collision functions ---------------------------*/ +// This mechanism permits us to overcome a limitation of Meyers' approach: we +// can declare the parameter types exactly as we want, rather than having to +// make them all GameObject& parameters. +std::string shipAsteroid(SpaceShip& ship, Asteroid& rock) +{ +// std::cout << rock.stringize() << " has pulverized " << ship.stringize() << std::endl; + return "shipAsteroid"; +} + +std::string militaryShipAsteroid(MilitaryShip& ship, Asteroid& rock) +{ +// std::cout << rock.stringize() << " has severely damaged " << ship.stringize() << std::endl; + return "militaryShipAsteroid"; +} + +std::string shipStation(SpaceShip& ship, SpaceStation& dock) +{ +// std::cout << ship.stringize() << " has docked at " << dock.stringize() << std::endl; + return "shipStation"; +} + +std::string asteroidStation(Asteroid& rock, SpaceStation& dock) +{ +// std::cout << rock.stringize() << " has damaged " << dock.stringize() << std::endl; + return "asteroidStation"; +} + +/*------------------------------- Test code --------------------------------*/ +namespace tut +{ + struct dispatch_data + { + dispatch_data(): + home(new SpaceStation("Terra Station")), + obstacle(new Asteroid("Ganymede")), + tug(new CommercialShip("Pilotfish")), + patrol(new MilitaryShip("Enterprise")) + {} + + // Instantiate and populate the DoubleDispatch object. + typedef LLDoubleDispatch<std::string, GameObject> DD; + DD dispatcher; + + // Instantiate a few GameObjects. Make sure we refer to them + // polymorphically, and don't let them leak. + std::auto_ptr<GameObject> home; + std::auto_ptr<GameObject> obstacle; + std::auto_ptr<GameObject> tug; + std::auto_ptr<GameObject> patrol; + + // prototype objects + Asteroid dummyAsteroid; + SpaceShip dummyShip; + MilitaryShip dummyMilitary; + CommercialShip dummyCommercial; + SpaceStation dummyStation; + }; + typedef test_group<dispatch_data> dispatch_group; + typedef dispatch_group::object dispatch_object; + tut::dispatch_group ddgr("double dispatch"); + + template<> template<> + void dispatch_object::test<1>() + { + // Describe param types using explicit DD::Type objects + // (order-sensitive add() variant) + dispatcher.add(DD::Type<SpaceShip>(), DD::Type<Asteroid>(), shipAsteroid, true); + // naive adding, won't work + dispatcher.add(DD::Type<MilitaryShip>(), DD::Type<Asteroid>(), militaryShipAsteroid, true); + dispatcher.add(DD::Type<SpaceShip>(), DD::Type<SpaceStation>(), shipStation, true); + dispatcher.add(DD::Type<Asteroid>(), DD::Type<SpaceStation>(), asteroidStation, true); + + // Try colliding them. + ensure_equals(dispatcher(*home, *tug), // reverse params, SpaceShip subclass + "shipStation"); + ensure_equals(dispatcher(*patrol, *home), // forward params, SpaceShip subclass + "shipStation"); + ensure_equals(dispatcher(*obstacle, *home), // forward params + "asteroidStation"); + ensure_equals(dispatcher(*home, *obstacle), // reverse params + "asteroidStation"); + ensure_equals(dispatcher(*tug, *obstacle), // forward params, SpaceShip subclass + "shipAsteroid"); + ensure_equals(dispatcher(*obstacle, *patrol), // reverse params, SpaceShip subclass + // won't use militaryShipAsteroid() because it was added + // in wrong order + "shipAsteroid"); + } + + template<> template<> + void dispatch_object::test<2>() + { + // Describe param types using explicit DD::Type objects + // (order-sensitive add() variant) + // adding in correct order + dispatcher.add(DD::Type<MilitaryShip>(), DD::Type<Asteroid>(), militaryShipAsteroid, true); + dispatcher.add(DD::Type<SpaceShip>(), DD::Type<Asteroid>(), shipAsteroid, true); + dispatcher.add(DD::Type<SpaceShip>(), DD::Type<SpaceStation>(), shipStation, true); + dispatcher.add(DD::Type<Asteroid>(), DD::Type<SpaceStation>(), asteroidStation, true); + + ensure_equals(dispatcher(*patrol, *obstacle), "militaryShipAsteroid"); + ensure_equals(dispatcher(*tug, *obstacle), "shipAsteroid"); + } + + template<> template<> + void dispatch_object::test<3>() + { + // Describe param types with actual prototype instances + // (order-insensitive add() variant) + dispatcher.add(dummyMilitary, dummyAsteroid, militaryShipAsteroid); + dispatcher.add(dummyShip, dummyAsteroid, shipAsteroid); + dispatcher.add(dummyShip, dummyStation, shipStation); + dispatcher.add(dummyAsteroid, dummyStation, asteroidStation); + + ensure_equals(dispatcher(*patrol, *obstacle), "militaryShipAsteroid"); + ensure_equals(dispatcher(*tug, *obstacle), "shipAsteroid"); + ensure_equals(dispatcher(*obstacle, *patrol), ""); + } + + template<> template<> + void dispatch_object::test<4>() + { + // Describe param types with actual prototype instances + // (order-insensitive add() variant) + dispatcher.add(dummyShip, dummyAsteroid, shipAsteroid); + // Even if we add the militaryShipAsteroid in the wrong order, it + // should still work. + dispatcher.add(dummyMilitary, dummyAsteroid, militaryShipAsteroid); + dispatcher.add(dummyShip, dummyStation, shipStation); + dispatcher.add(dummyAsteroid, dummyStation, asteroidStation); + + ensure_equals(dispatcher(*patrol, *obstacle), "militaryShipAsteroid"); + ensure_equals(dispatcher(*tug, *obstacle), "shipAsteroid"); + } + + template<> template<> + void dispatch_object::test<5>() + { + dispatcher.add<SpaceShip, Asteroid>(shipAsteroid); + dispatcher.add<MilitaryShip, Asteroid>(militaryShipAsteroid); + dispatcher.add<SpaceShip, SpaceStation>(shipStation); + dispatcher.add<Asteroid, SpaceStation>(asteroidStation); + + ensure_equals(dispatcher(*patrol, *obstacle), "militaryShipAsteroid"); + ensure_equals(dispatcher(*tug, *obstacle), "shipAsteroid"); + } +} // namespace tut diff --git a/indra/test/llhttpclient_tut.cpp b/indra/test/llhttpclient_tut.cpp index d1bf8ae5a9..c541997e89 100644 --- a/indra/test/llhttpclient_tut.cpp +++ b/indra/test/llhttpclient_tut.cpp @@ -59,8 +59,8 @@ namespace tut class LLSDStorageNode : public LLHTTPNode { public: - LLSD get() const { return storage; } - LLSD put(const LLSD& value) const { storage = value; return LLSD(); } + LLSD simpleGet() const { return storage; } + LLSD simplePut(const LLSD& value) const { storage = value; return LLSD(); } }; class ErrorNode : public LLHTTPNode diff --git a/indra/test/llhttpdate_tut.cpp b/indra/test/llhttpdate_tut.cpp index b764696dae..b9733dc030 100644 --- a/indra/test/llhttpdate_tut.cpp +++ b/indra/test/llhttpdate_tut.cpp @@ -50,6 +50,7 @@ namespace tut template<> template<> void httpdate_object::test<1>() { + static std::string epoch_expected = "Thursday, 01 Jan 1970 00:00:00 GMT" ; ensure("Check Epoch in RFC 1123", ( epoch_expected == some_date.asRFC1123())); } @@ -57,6 +58,7 @@ namespace tut template<> template<> void httpdate_object::test<2>() { + static std::string expected = "Wednesday, 18 Jul 2007 22:17:24 GMT" ; some_date = LLDate(1184797044.037586); ensure("Check some timestamp in RFC 1123", ( expected == some_date.asRFC1123())); @@ -66,6 +68,7 @@ namespace tut template<> template<> void httpdate_object::test<3>() { + //F64 sometime = LLFrameTimer::getTotalSeconds(); time_t sometime; time(&sometime); diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp index 9dbb9642dd..4eadc64b5a 100644 --- a/indra/test/llpermissions_tut.cpp +++ b/indra/test/llpermissions_tut.cpp @@ -485,15 +485,8 @@ namespace tut template<> template<> void permission_object_t::test<22>() { - LLPermissions perm,perm1; - LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); - LLUUID owner("68edcf47-ccd7-45b8-9f90-1649d7f12806"); - LLUUID lastOwner("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); - LLUUID group("9c8eca51-53d5-42a7-bb58-cef070395db8"); - perm.init(creator,owner,lastOwner,group); - LLXMLNode* xml_node = perm.exportFileXML(); - perm1.importXML(xml_node); - ensure("exportFileXML()/importXML():failed to export and import the data ", perm1 == perm); + // Deleted LLPermissions::exportFileXML() and LLPermissions::importXML() + // because I can't find any non-test code references to it. 2009-05-04 JC } template<> template<> diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp index 7f8219cdc8..fa5e047513 100644 --- a/indra/test/llsaleinfo_tut.cpp +++ b/indra/test/llsaleinfo_tut.cpp @@ -167,19 +167,8 @@ namespace tut template<> template<> void llsaleinfo_test_t::test<4>() { -// LLXMLNode is teh suck. -#if 0 - S32 sale_price = 23445; - LLSaleInfo saleinfo(LLSaleInfo::FS_CONTENTS, sale_price); - - LLXMLNode* x_node = saleinfo.exportFileXML(); - - LLSaleInfo saleinfo1(LLSaleInfo::FS_NOT, 0); - - saleinfo1.importXML(x_node); - ensure_equals("1.importXML() fn failed", saleinfo.getSalePrice(), saleinfo1.getSalePrice()); - ensure_equals("2.importXML() fn failed", saleinfo.getSaleType(), saleinfo1.getSaleType()); -#endif + // Deleted LLSaleInfo::exportFileXML() and LLSaleInfo::importXML() + // because I can't find any non-test code references to it. 2009-05-04 JC } template<> template<> diff --git a/indra/test/llscriptresource_tut.cpp b/indra/test/llscriptresource_tut.cpp index e384c275a3..705fdd16ae 100644 --- a/indra/test/llscriptresource_tut.cpp +++ b/indra/test/llscriptresource_tut.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2008&license=viewergpl$ * - * Copyright (c) 2006-2007, Linden Research, Inc. + * Copyright (c) 2008-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,12 +12,13 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp index 27ab127772..34f3530308 100755 --- a/indra/test/llsdmessagebuilder_tut.cpp +++ b/indra/test/llsdmessagebuilder_tut.cpp @@ -353,7 +353,7 @@ namespace tut { char binData[] = "abcdefghijklmnop"; - addValue(messageBlockData, "testBinData", &binData, MVT_FIXED, sizeof(binData)); + addValue(messageBlockData, (char *)"testBinData", &binData, MVT_FIXED, sizeof(binData)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -393,7 +393,7 @@ namespace tut { U16 binData[] = {1,2,3,4,5,6,7,8,9}; //9 shorts - addValue(messageBlockData, "testBinData", &binData, MVT_VARIABLE, sizeof(binData) >> 1, 2); + addValue(messageBlockData, (char *)"testBinData", &binData, MVT_VARIABLE, sizeof(binData) >> 1, 2); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -413,7 +413,7 @@ namespace tut { U32 binData[] = {9,8,7,6,5,4,3,2,1}; - addValue(messageBlockData, "testBinData", &binData, MVT_VARIABLE, sizeof(binData) >> 2, 4); + addValue(messageBlockData, (char *)"testBinData", &binData, MVT_VARIABLE, sizeof(binData) >> 2, 4); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -433,7 +433,7 @@ namespace tut { U8 data = 0xa5; - addValue(messageBlockData, "testBinData", &data, MVT_U8, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_U8, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -450,7 +450,7 @@ namespace tut { U16 data = 0xa55a; - addValue(messageBlockData, "testBinData", &data, MVT_U16, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_U16, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -467,7 +467,7 @@ namespace tut { U32 data = 0xa55a7117; - addValue(messageBlockData, "testBinData", &data, MVT_U32, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_U32, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -483,7 +483,7 @@ namespace tut void LLSDMessageBuilderTestObject::test<27>() { U64 data = U64L(0xa55a711711223344); - addValue(messageBlockData, "testBinData", &data, MVT_U64, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_U64, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -500,7 +500,7 @@ namespace tut { S8 data = -31; - addValue(messageBlockData, "testBinData", &data, MVT_S8, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_S8, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -517,7 +517,7 @@ namespace tut { S16 data = -31; - addValue(messageBlockData, "testBinData", &data, MVT_S16, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_S16, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -534,7 +534,7 @@ namespace tut { S32 data = -3100; - addValue(messageBlockData, "testBinData", &data, MVT_S32, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_S32, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -551,7 +551,7 @@ namespace tut { S64 data = -31003100; - addValue(messageBlockData, "testBinData", &data, MVT_S64, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_S64, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -568,7 +568,7 @@ namespace tut { F32 data = 1234.1234f; - addValue(messageBlockData, "testBinData", &data, MVT_F32, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_F32, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -585,7 +585,7 @@ namespace tut { F64 data = 1234.1234; - addValue(messageBlockData, "testBinData", &data, MVT_F64, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_F64, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -602,7 +602,7 @@ namespace tut { LLVector3 data(1,2,3); - addValue(messageBlockData, "testBinData", &data, MVT_LLVector3, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_LLVector3, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -619,7 +619,7 @@ namespace tut { LLVector3d data(1,2,3); - addValue(messageBlockData, "testBinData", &data, MVT_LLVector3d, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_LLVector3d, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -637,7 +637,7 @@ namespace tut LLVector4 data(1,2,3,4); LLSD v = ll_sd_from_vector4(data); - addValue(messageBlockData, "testBinData", &data, MVT_LLVector4, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_LLVector4, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -657,7 +657,7 @@ namespace tut //we send a quaternion packed into a vec3 (w is infered) - so sizeof(vec) == 12 bytes not 16. LLVector3 vec = data.packToVector3(); - addValue(messageBlockData, "testBinData", &vec, MVT_LLQuaternion, sizeof(vec)); + addValue(messageBlockData, (char *)"testBinData", &vec, MVT_LLQuaternion, sizeof(vec)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -674,7 +674,7 @@ namespace tut { LLUUID data("01234567-0123-0123-0123-234567abcdef"); - addValue(messageBlockData, "testBinData", &data, MVT_LLUUID, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_LLUUID, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -696,8 +696,8 @@ namespace tut LLMsgData* md = new LLMsgData("testMessage"); LLMsgBlkData* mbd = new LLMsgBlkData("testBlock", 0); - addValue(mbd, "testBoolFalse", &valueFalse, MVT_BOOL, sizeof(BOOL)); - addValue(mbd, "testBoolTrue", &valueTrue, MVT_BOOL, sizeof(BOOL)); + addValue(mbd, (char *)"testBoolFalse", &valueFalse, MVT_BOOL, sizeof(BOOL)); + addValue(mbd, (char *)"testBoolTrue", &valueTrue, MVT_BOOL, sizeof(BOOL)); md->addBlock(mbd); LLSDMessageBuilder builder = defaultBuilder(); @@ -715,7 +715,7 @@ namespace tut U32 data(0xff887766); LLSD v = ll_sd_from_ipaddr(data); - addValue(messageBlockData, "testBinData", &data, MVT_IP_ADDR, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_IP_ADDR, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -732,7 +732,7 @@ namespace tut { U16 data = 0xff88; - addValue(messageBlockData, "testBinData", &data, MVT_IP_PORT, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_IP_PORT, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -749,7 +749,7 @@ namespace tut { U16 data[3] = {0,1,2}; - addValue(messageBlockData, "testBinData", &data, MVT_U16Vec3, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_U16Vec3, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -769,7 +769,7 @@ namespace tut { U16 data[4] = {0,1,2,4}; - addValue(messageBlockData, "testBinData", &data, MVT_U16Quat, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_U16Quat, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); @@ -789,7 +789,7 @@ namespace tut { S16 data[19] = {0,-1,2,-4,5,-6,7,-8,9,-10,11,-12,13,-14,15,16,17,18}; - addValue(messageBlockData, "testBinData", &data, MVT_S16Array, sizeof(data)); + addValue(messageBlockData, (char *)"testBinData", &data, MVT_S16Array, sizeof(data)); messageData->addBlock(messageBlockData); LLSDMessageBuilder builder = defaultBuilder(); diff --git a/indra/test/lltimestampcache_tut.cpp b/indra/test/lltimestampcache_tut.cpp index 9e0de0fe60..3b102a3366 100644 --- a/indra/test/lltimestampcache_tut.cpp +++ b/indra/test/lltimestampcache_tut.cpp @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2008&license=viewergpl$ * - * Copyright (c) 2008, Linden Research, Inc. + * Copyright (c) 2008-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -13,12 +13,13 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/indra/test/lltranscode_tut.cpp b/indra/test/lltranscode_tut.cpp index 8abf9dc224..eb21979db0 100644 --- a/indra/test/lltranscode_tut.cpp +++ b/indra/test/lltranscode_tut.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2008&license=viewergpl$ * - * Copyright (c) 2006-2007, Linden Research, Inc. + * Copyright (c) 2008-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,12 +12,13 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/indra/test/test.h b/indra/test/test.h index 16ec4effcf..cee185140c 100644 --- a/indra/test/test.h +++ b/indra/test/test.h @@ -13,12 +13,13 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, |