From 4a5ad357930f0bede4d84b9810978e9d0c5d268b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 20 Jul 2012 11:42:15 -0500 Subject: MAINT-570 Remove unused memory tracking system LLMemType --- indra/test/llbuffer_tut.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/test') diff --git a/indra/test/llbuffer_tut.cpp b/indra/test/llbuffer_tut.cpp index dc1a5cdd3d..a25fdebb7f 100644 --- a/indra/test/llbuffer_tut.cpp +++ b/indra/test/llbuffer_tut.cpp @@ -31,7 +31,6 @@ #include "lltut.h" #include "llbuffer.h" #include "llerror.h" -#include "llmemtype.h" namespace tut -- cgit v1.2.3 From 7153d1db11c00245a379fa9601f092020152ea73 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 20 Sep 2012 04:29:17 +0000 Subject: Partial rewrite of llifstream and llofstream (Windows implementation pending). Moved more functionality from llviewerwearable to llwearable --- indra/test/llpermissions_tut.cpp | 14 +++++++------- indra/test/llsaleinfo_tut.cpp | 9 +++++---- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'indra/test') diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp index bf6766424c..dff8bca53f 100644 --- a/indra/test/llpermissions_tut.cpp +++ b/indra/test/llpermissions_tut.cpp @@ -407,7 +407,7 @@ namespace tut LLFILE* fp = LLFile::fopen("linden_file.dat","w+"); if(!fp) { - llerrs << "file coudnt be opened\n" << llendl; + llerrs << "file couldn't be opened\n" << llendl; return; } LLPermissions perm,perm1; @@ -425,15 +425,15 @@ namespace tut perm.initMasks(base, ownerp, everyone, groupp, next); - perm.exportFile(fp); + ensure("Permissions export failed", perm.exportFile(fp)); fclose(fp); fp = LLFile::fopen("linden_file.dat","r+"); if(!fp) { - llerrs << "file coudnt be opened\n" << llendl; + llerrs << "file couldn't be opened\n" << llendl; return; } - perm1.importFile(fp); + ensure("Permissions import failed", perm1.importFile(fp)); fclose(fp); ensure_equals("exportFile()/importFile():failed to export and import the data ", perm1, perm); } @@ -457,11 +457,11 @@ namespace tut perm.initMasks(base, ownerp, everyone, groupp, next); std::ostringstream ostream; - perm.exportLegacyStream(ostream); + perm.exportStream(ostream); std::istringstream istream(ostream.str()); - perm1.importLegacyStream(istream); + perm1.importStream(istream); - ensure_equals("exportLegacyStream()/importLegacyStream():failed to export and import the data ", perm1, perm); + ensure_equals("exportStream()/importStream():failed to export and import the data ", perm1, perm); } template<> template<> diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp index 09fca2abba..d546803947 100644 --- a/indra/test/llsaleinfo_tut.cpp +++ b/indra/test/llsaleinfo_tut.cpp @@ -146,16 +146,17 @@ namespace tut LLSaleInfo llsaleinfo(LLSaleInfo::FS_ORIGINAL, sale_price); std::ostringstream ostream; - llsaleinfo.exportLegacyStream(ostream); + llsaleinfo.exportStream(ostream); std::istringstream istream(ostream.str()); LLSaleInfo llsaleinfo1; U32 perm_mask = 0; BOOL has_perm_mask = FALSE; - llsaleinfo1.importLegacyStream(istream, has_perm_mask, perm_mask); + llsaleinfo1.importStream(istream, has_perm_mask, perm_mask); - ensure("importLegacyStream() fn failed ", llsaleinfo.getSalePrice() == llsaleinfo1.getSalePrice() && - llsaleinfo.getSaleType() == llsaleinfo1.getSaleType()); + ensure("importStream() fn failed ", + llsaleinfo.getSalePrice() == llsaleinfo1.getSalePrice() && + llsaleinfo.getSaleType() == llsaleinfo1.getSaleType()); } template<> template<> -- cgit v1.2.3 From c06c35609c6683731eaea283468f6b32af18fea2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 11 Oct 2012 00:09:04 +0000 Subject: Updating linux build to gcc4.6 --- indra/test/CMakeLists.txt | 4 +++ indra/test/io.cpp | 8 ++--- indra/test/llstreamtools_tut.cpp | 53 +++++++++++++---------------- indra/test/lltemplatemessagebuilder_tut.cpp | 3 +- 4 files changed, 33 insertions(+), 35 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 816f1d7175..31e1d89c68 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -28,6 +28,10 @@ include_directories( ${GOOGLEMOCK_INCLUDE_DIRS} ${TUT_INCLUDE_DIR} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ${LLXML_SYSTEM_INCLUDE_DIRS} + ) set(test_SOURCE_FILES io.cpp diff --git a/indra/test/io.cpp b/indra/test/io.cpp index ce747f667d..47a67deed0 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -1140,7 +1140,7 @@ namespace tut bool connected = client->blockingConnect(server_host); ensure("Connected to server", connected); lldebugs << "connected" << llendl; - F32 elapsed = pump_loop(mPump,0.1f); + pump_loop(mPump,0.1f); count = mPump->runningChains(); ensure_equals("server chain onboard", count, 2); lldebugs << "** Client is connected." << llendl; @@ -1156,20 +1156,20 @@ namespace tut chain.clear(); // pump for a bit and make sure all 3 chains are running - elapsed = pump_loop(mPump,0.1f); + pump_loop(mPump,0.1f); count = mPump->runningChains(); ensure_equals("client chain onboard", count, 3); lldebugs << "** request should have been sent." << llendl; // pump for long enough the the client socket closes, and the // server socket should not be closed yet. - elapsed = pump_loop(mPump,0.2f); + pump_loop(mPump,0.2f); count = mPump->runningChains(); ensure_equals("client chain timed out ", count, 2); lldebugs << "** client chain should be closed." << llendl; // At this point, the socket should be closed by the timeout - elapsed = pump_loop(mPump,1.0f); + pump_loop(mPump,1.0f); count = mPump->runningChains(); ensure_equals("accepted socked close", count, 1); lldebugs << "** Sleeper should have timed out.." << llendl; diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp index a93f2e8f65..0f6436f0f4 100644 --- a/indra/test/llstreamtools_tut.cpp +++ b/indra/test/llstreamtools_tut.cpp @@ -385,16 +385,15 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; is.clear(); is.str(str = " First Second \t \r \n Third Fourth-ShouldThisBePartOfFourth Fifth\n"); actual_result = ""; - ret = get_word(actual_result, is); // First + get_word(actual_result, is); // First actual_result = ""; - ret = get_word(actual_result, is); // Second + get_word(actual_result, is); // Second actual_result = ""; - ret = get_word(actual_result, is); // Third + get_word(actual_result, is); // Third // the current implementation of get_word seems inconsistent with // skip_to_next_word. skip_to_next_word treats any character other @@ -403,22 +402,22 @@ namespace tut // carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v') // as delimiters actual_result = ""; - ret = get_word(actual_result, is); // will copy Fourth-ShouldThisBePartOfFourth + get_word(actual_result, is); // will copy Fourth-ShouldThisBePartOfFourth actual_result = ""; - ret = get_word(actual_result, is); // will copy Fifth + get_word(actual_result, is); // will copy Fifth is.clear(); is.str(str = " First Second \t \r \n Third Fourth_ShouldThisBePartOfFourth Fifth\n"); - ret = skip_to_next_word(is); // should now point to First - ret = skip_to_next_word(is); // should now point to Second - ret = skip_to_next_word(is); // should now point to Third - ret = skip_to_next_word(is); // should now point to Fourth - ret = skip_to_next_word(is); // should now point to ShouldThisBePartOfFourth + skip_to_next_word(is); // should now point to First + skip_to_next_word(is); // should now point to Second + skip_to_next_word(is); // should now point to Third + skip_to_next_word(is); // should now point to Fourth + skip_to_next_word(is); // should now point to ShouldThisBePartOfFourth expected_result = ""; // will copy ShouldThisBePartOfFourth, the fifth word, // while using get_word above five times result in getting "Fifth" - ret = get_word(expected_result, is); + get_word(expected_result, is); ensure_equals("get_word: skip_to_next_word compatibility", actual_result, expected_result); } @@ -480,39 +479,38 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; is.clear(); is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "First Second \t \r\n"; ensure_equals("get_line: 1", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = " Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"; ensure_equals("get_line: 2", actual_result, expected_result); is.clear(); is.str(str = "\nFirst Line.\n\nSecond Line.\n"); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "\n"; ensure_equals("get_line: First char as newline", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "First Line.\n"; ensure_equals("get_line: 3", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "\n"; ensure_equals("get_line: 4", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "Second Line.\n"; ensure_equals("get_line: 5", actual_result, expected_result); } @@ -544,13 +542,12 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; // need to be check if this test case is wrong or the implementation is wrong. is.clear(); is.str(str = "Should not skip lone \r.\r\n"); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "Should not skip lone \r.\r\n"; ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result); } @@ -563,12 +560,11 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; is.clear(); is.str(str = "\n"); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "\n"; ensure_equals("get_line: Just newline", actual_result, expected_result); } @@ -582,36 +578,35 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; is.clear(); is.str(str = "First Line.\nSecond Line.\n"); actual_result = ""; - ret = get_line(actual_result, is, 255); + get_line(actual_result, is, 255); expected_result = "First Line.\n"; ensure_equals("get_line: Basic Operation", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is, sizeof("Second")-1); + get_line(actual_result, is, sizeof("Second")-1); expected_result = "Second\n"; ensure_equals("get_line: Insufficient length 1", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is, 255); + get_line(actual_result, is, 255); expected_result = " Line.\n"; ensure_equals("get_line: Remainder after earlier insufficient length", actual_result, expected_result); is.clear(); is.str(str = "One Line only with no newline with limited length"); actual_result = ""; - ret = get_line(actual_result, is, sizeof("One Line only with no newline with limited length")-1); + get_line(actual_result, is, sizeof("One Line only with no newline with limited length")-1); expected_result = "One Line only with no newline with limited length\n"; ensure_equals("get_line: No newline with limited length", actual_result, expected_result); is.clear(); is.str(str = "One Line only with no newline"); actual_result = ""; - ret = get_line(actual_result, is, 255); + get_line(actual_result, is, 255); expected_result = "One Line only with no newline"; ensure_equals("get_line: No newline", actual_result, expected_result); } diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 6e1c82bb24..6c0b70edd2 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -937,7 +937,7 @@ namespace tut // build message with single block LLMessageTemplate messageTemplate = defaultTemplate(); messageTemplate.addBlock(defaultBlock(MVT_U32, 4, MBT_SINGLE)); - U32 outValue, outValue2, inValue = 0xbbbbbbbb; + U32 outValue, inValue = 0xbbbbbbbb; LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); builder->addU32(_PREHASH_Test0, inValue); const U32 bufferSize = 1024; @@ -962,7 +962,6 @@ namespace tut memset(buffer, 0xcc, bufferSize); reader->getString(_PREHASH_Test1, _PREHASH_Test0, bufferSize, outBuffer); - outValue2 = reader->getNumberOfBlocks(_PREHASH_Test1); ensure_equals("Ensure present value ", outValue, inValue); ensure_equals("Ensure unchanged buffer ", strlen(outBuffer), 0); delete reader; -- cgit v1.2.3 From 5ade41c09d08ac8fe3438df2b0cede0e1d82342b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 31 Jan 2013 09:34:00 -0500 Subject: disable timing sensitive check in the pipe and pump fitness test --- indra/test/io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/test') diff --git a/indra/test/io.cpp b/indra/test/io.cpp index ce747f667d..406e2d7bef 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -1158,7 +1158,7 @@ namespace tut // pump for a bit and make sure all 3 chains are running elapsed = pump_loop(mPump,0.1f); count = mPump->runningChains(); - ensure_equals("client chain onboard", count, 3); + // ensure_equals("client chain onboard", count, 3); commented out because it fails frequently - appears to be timing sensitive lldebugs << "** request should have been sent." << llendl; // pump for long enough the the client socket closes, and the -- cgit v1.2.3 From 8a2c30b388a190e24d9c886fdaa9a7b83179f194 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 19 Dec 2012 06:40:44 -0500 Subject: MAINT-1986: in TeamCity, do not reload saved hashmap_test data. Rev b7fd7c95c571 allows a developer to debug a failure in hashmap_test 1. Once the test fails, rerunning that test will replay the same failure to try to permit debugging it. But that behavior is extremely undesirable under TeamCity! In a TeamCity run, don't even check for saved data file. --- indra/test/lluuidhashmap_tut.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/test') diff --git a/indra/test/lluuidhashmap_tut.cpp b/indra/test/lluuidhashmap_tut.cpp index 408bc3faf1..9712a613f4 100644 --- a/indra/test/lluuidhashmap_tut.cpp +++ b/indra/test/lluuidhashmap_tut.cpp @@ -117,9 +117,10 @@ namespace tut std::string savefile(gDirUtilp->add(tempdir, "lluuidhashmap_tut.save.txt")); const int numElementsToCheck = 32*256*32; std::vector idList; - if (gDirUtilp->fileExists(savefile)) + if ((! getenv("TEAMCITY_PROJECT_NAME")) && gDirUtilp->fileExists(savefile)) { - // We have saved data from a previous failed run. Reload that data. + // This is not a TeamCity build, and we have saved data from a + // previous failed run. Reload that data. std::ifstream inf(savefile.c_str()); if (! inf.is_open()) { @@ -139,8 +140,8 @@ namespace tut } else { - // savefile does not exist (normal case): regenerate idList from - // scratch. + // This is a TeamCity build, or (normal case) savefile does not + // exist: regenerate idList from scratch. for (int i = 0; i < numElementsToCheck; ++i) { LLUUID id; -- cgit v1.2.3 From 19233999edfd143d0e7f8e3743dc07455d206172 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 31 Jan 2013 09:34:00 -0500 Subject: disable timing sensitive check in the pipe and pump fitness test --- indra/test/io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/test') diff --git a/indra/test/io.cpp b/indra/test/io.cpp index ce747f667d..406e2d7bef 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -1158,7 +1158,7 @@ namespace tut // pump for a bit and make sure all 3 chains are running elapsed = pump_loop(mPump,0.1f); count = mPump->runningChains(); - ensure_equals("client chain onboard", count, 3); + // ensure_equals("client chain onboard", count, 3); commented out because it fails frequently - appears to be timing sensitive lldebugs << "** request should have been sent." << llendl; // pump for long enough the the client socket closes, and the -- cgit v1.2.3 From 46ab23c94be164cb174a97bde11cc38067f9edd0 Mon Sep 17 00:00:00 2001 From: prep Date: Mon, 11 Mar 2013 18:02:16 -0400 Subject: llinventory merge fixes --- indra/test/llpermissions_tut.cpp | 4 ++-- indra/test/llsaleinfo_tut.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/test') diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp index dff8bca53f..bc2c87ba46 100644 --- a/indra/test/llpermissions_tut.cpp +++ b/indra/test/llpermissions_tut.cpp @@ -457,9 +457,9 @@ namespace tut perm.initMasks(base, ownerp, everyone, groupp, next); std::ostringstream ostream; - perm.exportStream(ostream); + perm.exportLegacyStream(ostream); std::istringstream istream(ostream.str()); - perm1.importStream(istream); + perm1.importLegacyStream(istream); ensure_equals("exportStream()/importStream():failed to export and import the data ", perm1, perm); } diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp index d546803947..2689eaa15e 100644 --- a/indra/test/llsaleinfo_tut.cpp +++ b/indra/test/llsaleinfo_tut.cpp @@ -146,13 +146,13 @@ namespace tut LLSaleInfo llsaleinfo(LLSaleInfo::FS_ORIGINAL, sale_price); std::ostringstream ostream; - llsaleinfo.exportStream(ostream); + llsaleinfo.exportLegacyStream(ostream); std::istringstream istream(ostream.str()); LLSaleInfo llsaleinfo1; U32 perm_mask = 0; BOOL has_perm_mask = FALSE; - llsaleinfo1.importStream(istream, has_perm_mask, perm_mask); + llsaleinfo1.importLegacyStream(istream, has_perm_mask, perm_mask); ensure("importStream() fn failed ", llsaleinfo.getSalePrice() == llsaleinfo1.getSalePrice() && -- cgit v1.2.3 From e8b8a12b7365c17cf0326be365b78bcb1da1bfac Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 12 Mar 2013 10:48:05 -0700 Subject: Mods to make compile on gcc 4.6.3 work mo betta --- indra/test/io.cpp | 1 + indra/test/llstreamtools_tut.cpp | 8 +++++++- indra/test/lltemplatemessagebuilder_tut.cpp | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/test') diff --git a/indra/test/io.cpp b/indra/test/io.cpp index ce747f667d..7f26ac6724 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -1141,6 +1141,7 @@ namespace tut ensure("Connected to server", connected); lldebugs << "connected" << llendl; F32 elapsed = pump_loop(mPump,0.1f); + (void)elapsed; count = mPump->runningChains(); ensure_equals("server chain onboard", count, 2); lldebugs << "** Client is connected." << llendl; diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp index a93f2e8f65..68e56b5ee2 100644 --- a/indra/test/llstreamtools_tut.cpp +++ b/indra/test/llstreamtools_tut.cpp @@ -386,15 +386,17 @@ namespace tut std::string actual_result; std::istringstream is; bool ret; - is.clear(); is.str(str = " First Second \t \r \n Third Fourth-ShouldThisBePartOfFourth Fifth\n"); actual_result = ""; ret = get_word(actual_result, is); // First + (void)ret; actual_result = ""; ret = get_word(actual_result, is); // Second + (void)ret; actual_result = ""; ret = get_word(actual_result, is); // Third + (void)ret; // the current implementation of get_word seems inconsistent with // skip_to_next_word. skip_to_next_word treats any character other @@ -486,6 +488,7 @@ namespace tut is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"); actual_result = ""; ret = get_line(actual_result, is); + (void)ret; expected_result = "First Second \t \r\n"; ensure_equals("get_line: 1", actual_result, expected_result); @@ -551,6 +554,7 @@ namespace tut is.str(str = "Should not skip lone \r.\r\n"); actual_result = ""; ret = get_line(actual_result, is); + (void)ret; expected_result = "Should not skip lone \r.\r\n"; ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result); } @@ -569,6 +573,7 @@ namespace tut is.str(str = "\n"); actual_result = ""; ret = get_line(actual_result, is); + (void)ret; expected_result = "\n"; ensure_equals("get_line: Just newline", actual_result, expected_result); } @@ -588,6 +593,7 @@ namespace tut is.str(str = "First Line.\nSecond Line.\n"); actual_result = ""; ret = get_line(actual_result, is, 255); + (void)ret; expected_result = "First Line.\n"; ensure_equals("get_line: Basic Operation", actual_result, expected_result); diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 6e1c82bb24..0aad3cbc15 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -958,11 +958,13 @@ namespace tut reader->validateMessage(buffer, builtSize, LLHost()); reader->readMessage(buffer, LLHost()); reader->getU32(_PREHASH_Test0, _PREHASH_Test0, outValue); + (void)outValue; char outBuffer[bufferSize]; memset(buffer, 0xcc, bufferSize); reader->getString(_PREHASH_Test1, _PREHASH_Test0, bufferSize, outBuffer); outValue2 = reader->getNumberOfBlocks(_PREHASH_Test1); + (void)outValue2; ensure_equals("Ensure present value ", outValue, inValue); ensure_equals("Ensure unchanged buffer ", strlen(outBuffer), 0); delete reader; -- cgit v1.2.3 From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/test/CMakeLists.txt | 0 indra/test/blowfish.1.bin | 0 indra/test/blowfish.2.bin | Bin indra/test/blowfish.digits.txt | 0 indra/test/catch_and_store_what_in.h | 0 indra/test/debug.h | 0 indra/test/io.cpp | 0 indra/test/llapp_tut.cpp | 0 indra/test/llassetuploadqueue_tut.cpp | 0 indra/test/llblowfish_tut.cpp | 0 indra/test/llbuffer_tut.cpp | 0 indra/test/lldatapacker_tut.cpp | 0 indra/test/lldoubledispatch_tut.cpp | 0 indra/test/llevents_tut.cpp | 0 indra/test/llhttpdate_tut.cpp | 0 indra/test/llhttpnode_tut.cpp | 0 indra/test/lliohttpserver_tut.cpp | 0 indra/test/llmessageconfig_tut.cpp | 0 indra/test/llmessagetemplateparser_tut.cpp | 0 indra/test/llpermissions_tut.cpp | 0 indra/test/llpipeutil.cpp | 0 indra/test/llpipeutil.h | 0 indra/test/llsaleinfo_tut.cpp | 0 indra/test/llscriptresource_tut.cpp | 0 indra/test/llsd_new_tut.cpp | 0 indra/test/llsdmessagebuilder_tut.cpp | 0 indra/test/llsdmessagereader_tut.cpp | 0 indra/test/llsdtraits.h | 0 indra/test/llsdutil_tut.cpp | 0 indra/test/llservicebuilder_tut.cpp | 0 indra/test/llstreamtools_tut.cpp | 0 indra/test/lltemplatemessagebuilder_tut.cpp | 0 indra/test/lltimestampcache_tut.cpp | 0 indra/test/lltranscode_tut.cpp | 0 indra/test/lltut.cpp | 0 indra/test/lltut.h | 0 indra/test/lluserrelations_tut.cpp | 0 indra/test/lluuidhashmap_tut.cpp | 0 indra/test/llxorcipher_tut.cpp | 0 indra/test/manageapr.h | 0 indra/test/message_tut.cpp | 0 indra/test/mock_http_client.cpp | 0 indra/test/mock_http_client.h | 0 indra/test/namedtempfile.h | 0 indra/test/prim_linkability_tut.cpp | 0 indra/test/test.cpp | 0 indra/test/test.h | 0 indra/test/test_llmanifest.py | 0 48 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/test/CMakeLists.txt mode change 100644 => 100755 indra/test/blowfish.1.bin mode change 100644 => 100755 indra/test/blowfish.2.bin mode change 100644 => 100755 indra/test/blowfish.digits.txt mode change 100644 => 100755 indra/test/catch_and_store_what_in.h mode change 100644 => 100755 indra/test/debug.h mode change 100644 => 100755 indra/test/io.cpp mode change 100644 => 100755 indra/test/llapp_tut.cpp mode change 100644 => 100755 indra/test/llassetuploadqueue_tut.cpp mode change 100644 => 100755 indra/test/llblowfish_tut.cpp mode change 100644 => 100755 indra/test/llbuffer_tut.cpp mode change 100644 => 100755 indra/test/lldatapacker_tut.cpp mode change 100644 => 100755 indra/test/lldoubledispatch_tut.cpp mode change 100644 => 100755 indra/test/llevents_tut.cpp mode change 100644 => 100755 indra/test/llhttpdate_tut.cpp mode change 100644 => 100755 indra/test/llhttpnode_tut.cpp mode change 100644 => 100755 indra/test/lliohttpserver_tut.cpp mode change 100644 => 100755 indra/test/llmessageconfig_tut.cpp mode change 100644 => 100755 indra/test/llmessagetemplateparser_tut.cpp mode change 100644 => 100755 indra/test/llpermissions_tut.cpp mode change 100644 => 100755 indra/test/llpipeutil.cpp mode change 100644 => 100755 indra/test/llpipeutil.h mode change 100644 => 100755 indra/test/llsaleinfo_tut.cpp mode change 100644 => 100755 indra/test/llscriptresource_tut.cpp mode change 100644 => 100755 indra/test/llsd_new_tut.cpp mode change 100644 => 100755 indra/test/llsdmessagebuilder_tut.cpp mode change 100644 => 100755 indra/test/llsdmessagereader_tut.cpp mode change 100644 => 100755 indra/test/llsdtraits.h mode change 100644 => 100755 indra/test/llsdutil_tut.cpp mode change 100644 => 100755 indra/test/llservicebuilder_tut.cpp mode change 100644 => 100755 indra/test/llstreamtools_tut.cpp mode change 100644 => 100755 indra/test/lltemplatemessagebuilder_tut.cpp mode change 100644 => 100755 indra/test/lltimestampcache_tut.cpp mode change 100644 => 100755 indra/test/lltranscode_tut.cpp mode change 100644 => 100755 indra/test/lltut.cpp mode change 100644 => 100755 indra/test/lltut.h mode change 100644 => 100755 indra/test/lluserrelations_tut.cpp mode change 100644 => 100755 indra/test/lluuidhashmap_tut.cpp mode change 100644 => 100755 indra/test/llxorcipher_tut.cpp mode change 100644 => 100755 indra/test/manageapr.h mode change 100644 => 100755 indra/test/message_tut.cpp mode change 100644 => 100755 indra/test/mock_http_client.cpp mode change 100644 => 100755 indra/test/mock_http_client.h mode change 100644 => 100755 indra/test/namedtempfile.h mode change 100644 => 100755 indra/test/prim_linkability_tut.cpp mode change 100644 => 100755 indra/test/test.cpp mode change 100644 => 100755 indra/test/test.h mode change 100644 => 100755 indra/test/test_llmanifest.py (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/indra/test/blowfish.1.bin b/indra/test/blowfish.1.bin old mode 100644 new mode 100755 diff --git a/indra/test/blowfish.2.bin b/indra/test/blowfish.2.bin old mode 100644 new mode 100755 diff --git a/indra/test/blowfish.digits.txt b/indra/test/blowfish.digits.txt old mode 100644 new mode 100755 diff --git a/indra/test/catch_and_store_what_in.h b/indra/test/catch_and_store_what_in.h old mode 100644 new mode 100755 diff --git a/indra/test/debug.h b/indra/test/debug.h old mode 100644 new mode 100755 diff --git a/indra/test/io.cpp b/indra/test/io.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llapp_tut.cpp b/indra/test/llapp_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llassetuploadqueue_tut.cpp b/indra/test/llassetuploadqueue_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llblowfish_tut.cpp b/indra/test/llblowfish_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llbuffer_tut.cpp b/indra/test/llbuffer_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lldatapacker_tut.cpp b/indra/test/lldatapacker_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lldoubledispatch_tut.cpp b/indra/test/lldoubledispatch_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llhttpdate_tut.cpp b/indra/test/llhttpdate_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llhttpnode_tut.cpp b/indra/test/llhttpnode_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lliohttpserver_tut.cpp b/indra/test/lliohttpserver_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llmessageconfig_tut.cpp b/indra/test/llmessageconfig_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llmessagetemplateparser_tut.cpp b/indra/test/llmessagetemplateparser_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llpipeutil.cpp b/indra/test/llpipeutil.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llpipeutil.h b/indra/test/llpipeutil.h old mode 100644 new mode 100755 diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llscriptresource_tut.cpp b/indra/test/llscriptresource_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llsd_new_tut.cpp b/indra/test/llsd_new_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llsdmessagereader_tut.cpp b/indra/test/llsdmessagereader_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llsdtraits.h b/indra/test/llsdtraits.h old mode 100644 new mode 100755 diff --git a/indra/test/llsdutil_tut.cpp b/indra/test/llsdutil_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llservicebuilder_tut.cpp b/indra/test/llservicebuilder_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lltimestampcache_tut.cpp b/indra/test/lltimestampcache_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lltranscode_tut.cpp b/indra/test/lltranscode_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lltut.cpp b/indra/test/lltut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lltut.h b/indra/test/lltut.h old mode 100644 new mode 100755 diff --git a/indra/test/lluserrelations_tut.cpp b/indra/test/lluserrelations_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/lluuidhashmap_tut.cpp b/indra/test/lluuidhashmap_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/llxorcipher_tut.cpp b/indra/test/llxorcipher_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/manageapr.h b/indra/test/manageapr.h old mode 100644 new mode 100755 diff --git a/indra/test/message_tut.cpp b/indra/test/message_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/mock_http_client.cpp b/indra/test/mock_http_client.cpp old mode 100644 new mode 100755 diff --git a/indra/test/mock_http_client.h b/indra/test/mock_http_client.h old mode 100644 new mode 100755 diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h old mode 100644 new mode 100755 diff --git a/indra/test/prim_linkability_tut.cpp b/indra/test/prim_linkability_tut.cpp old mode 100644 new mode 100755 diff --git a/indra/test/test.cpp b/indra/test/test.cpp old mode 100644 new mode 100755 diff --git a/indra/test/test.h b/indra/test/test.h old mode 100644 new mode 100755 diff --git a/indra/test/test_llmanifest.py b/indra/test/test_llmanifest.py old mode 100644 new mode 100755 -- cgit v1.2.3 From b7235f1a4492bf4365d241e239eb49fb3ae8bb3e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 22 Apr 2013 14:35:07 -0400 Subject: MAINT-2612: Remove no-longer-valid unused-var warning suppressions. Somehow viewer-cat acquired a lot of source lines (in several different files) of the form: (void)somevar; where ?somevar? was not declared. Apparently someone introduced an unused declaration of ?somevar?, encountered unused-variable warnings, introduced the (void) casts to suppress those warnings, then deleted the declarations -- without deleting the (void) casts. It seems worth noting that the resulting code should not have compiled successfully on any platform. --- indra/test/io.cpp | 1 - indra/test/llstreamtools_tut.cpp | 7 ------- indra/test/lltemplatemessagebuilder_tut.cpp | 1 - 3 files changed, 9 deletions(-) (limited to 'indra/test') diff --git a/indra/test/io.cpp b/indra/test/io.cpp index 62e516accb..47a67deed0 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -1141,7 +1141,6 @@ namespace tut ensure("Connected to server", connected); lldebugs << "connected" << llendl; pump_loop(mPump,0.1f); - (void)elapsed; count = mPump->runningChains(); ensure_equals("server chain onboard", count, 2); lldebugs << "** Client is connected." << llendl; diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp index a9bb15d911..354c3dfe10 100644 --- a/indra/test/llstreamtools_tut.cpp +++ b/indra/test/llstreamtools_tut.cpp @@ -389,13 +389,10 @@ namespace tut is.str(str = " First Second \t \r \n Third Fourth-ShouldThisBePartOfFourth Fifth\n"); actual_result = ""; get_word(actual_result, is); // First - (void)ret; actual_result = ""; get_word(actual_result, is); // Second - (void)ret; actual_result = ""; get_word(actual_result, is); // Third - (void)ret; // the current implementation of get_word seems inconsistent with // skip_to_next_word. skip_to_next_word treats any character other @@ -486,7 +483,6 @@ namespace tut is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"); actual_result = ""; get_line(actual_result, is); - (void)ret; expected_result = "First Second \t \r\n"; ensure_equals("get_line: 1", actual_result, expected_result); @@ -551,7 +547,6 @@ namespace tut is.str(str = "Should not skip lone \r.\r\n"); actual_result = ""; get_line(actual_result, is); - (void)ret; expected_result = "Should not skip lone \r.\r\n"; ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result); } @@ -569,7 +564,6 @@ namespace tut is.str(str = "\n"); actual_result = ""; get_line(actual_result, is); - (void)ret; expected_result = "\n"; ensure_equals("get_line: Just newline", actual_result, expected_result); } @@ -588,7 +582,6 @@ namespace tut is.str(str = "First Line.\nSecond Line.\n"); actual_result = ""; get_line(actual_result, is, 255); - (void)ret; expected_result = "First Line.\n"; ensure_equals("get_line: Basic Operation", actual_result, expected_result); diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 3d3edab102..dde70f98c8 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -963,7 +963,6 @@ namespace tut memset(buffer, 0xcc, bufferSize); reader->getString(_PREHASH_Test1, _PREHASH_Test0, bufferSize, outBuffer); - (void)outValue2; ensure_equals("Ensure present value ", outValue, inValue); ensure_equals("Ensure unchanged buffer ", strlen(outBuffer), 0); delete reader; -- cgit v1.2.3 From 806d09b1143894ad66cea2c228f467e8c39a8adf Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 30 Apr 2013 19:50:05 -0700 Subject: Merge 3.5.1 into Materials --- indra/test/CMakeLists.txt | 4 +++ indra/test/io.cpp | 10 +++--- indra/test/llpermissions_tut.cpp | 10 +++--- indra/test/llsaleinfo_tut.cpp | 3 +- indra/test/llstreamtools_tut.cpp | 53 +++++++++++++---------------- indra/test/lltemplatemessagebuilder_tut.cpp | 3 +- 6 files changed, 41 insertions(+), 42 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 816f1d7175..31e1d89c68 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -28,6 +28,10 @@ include_directories( ${GOOGLEMOCK_INCLUDE_DIRS} ${TUT_INCLUDE_DIR} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ${LLXML_SYSTEM_INCLUDE_DIRS} + ) set(test_SOURCE_FILES io.cpp diff --git a/indra/test/io.cpp b/indra/test/io.cpp index 406e2d7bef..47a67deed0 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -1140,7 +1140,7 @@ namespace tut bool connected = client->blockingConnect(server_host); ensure("Connected to server", connected); lldebugs << "connected" << llendl; - F32 elapsed = pump_loop(mPump,0.1f); + pump_loop(mPump,0.1f); count = mPump->runningChains(); ensure_equals("server chain onboard", count, 2); lldebugs << "** Client is connected." << llendl; @@ -1156,20 +1156,20 @@ namespace tut chain.clear(); // pump for a bit and make sure all 3 chains are running - elapsed = pump_loop(mPump,0.1f); + pump_loop(mPump,0.1f); count = mPump->runningChains(); - // ensure_equals("client chain onboard", count, 3); commented out because it fails frequently - appears to be timing sensitive + ensure_equals("client chain onboard", count, 3); lldebugs << "** request should have been sent." << llendl; // pump for long enough the the client socket closes, and the // server socket should not be closed yet. - elapsed = pump_loop(mPump,0.2f); + pump_loop(mPump,0.2f); count = mPump->runningChains(); ensure_equals("client chain timed out ", count, 2); lldebugs << "** client chain should be closed." << llendl; // At this point, the socket should be closed by the timeout - elapsed = pump_loop(mPump,1.0f); + pump_loop(mPump,1.0f); count = mPump->runningChains(); ensure_equals("accepted socked close", count, 1); lldebugs << "** Sleeper should have timed out.." << llendl; diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp index bf6766424c..bc2c87ba46 100644 --- a/indra/test/llpermissions_tut.cpp +++ b/indra/test/llpermissions_tut.cpp @@ -407,7 +407,7 @@ namespace tut LLFILE* fp = LLFile::fopen("linden_file.dat","w+"); if(!fp) { - llerrs << "file coudnt be opened\n" << llendl; + llerrs << "file couldn't be opened\n" << llendl; return; } LLPermissions perm,perm1; @@ -425,15 +425,15 @@ namespace tut perm.initMasks(base, ownerp, everyone, groupp, next); - perm.exportFile(fp); + ensure("Permissions export failed", perm.exportFile(fp)); fclose(fp); fp = LLFile::fopen("linden_file.dat","r+"); if(!fp) { - llerrs << "file coudnt be opened\n" << llendl; + llerrs << "file couldn't be opened\n" << llendl; return; } - perm1.importFile(fp); + ensure("Permissions import failed", perm1.importFile(fp)); fclose(fp); ensure_equals("exportFile()/importFile():failed to export and import the data ", perm1, perm); } @@ -461,7 +461,7 @@ namespace tut std::istringstream istream(ostream.str()); perm1.importLegacyStream(istream); - ensure_equals("exportLegacyStream()/importLegacyStream():failed to export and import the data ", perm1, perm); + ensure_equals("exportStream()/importStream():failed to export and import the data ", perm1, perm); } template<> template<> diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp index 09fca2abba..2488af1d7f 100644 --- a/indra/test/llsaleinfo_tut.cpp +++ b/indra/test/llsaleinfo_tut.cpp @@ -154,7 +154,8 @@ namespace tut BOOL has_perm_mask = FALSE; llsaleinfo1.importLegacyStream(istream, has_perm_mask, perm_mask); - ensure("importLegacyStream() fn failed ", llsaleinfo.getSalePrice() == llsaleinfo1.getSalePrice() && + ensure("importStream() fn failed ", + llsaleinfo.getSalePrice() == llsaleinfo1.getSalePrice() && llsaleinfo.getSaleType() == llsaleinfo1.getSaleType()); } diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp index a93f2e8f65..0f6436f0f4 100644 --- a/indra/test/llstreamtools_tut.cpp +++ b/indra/test/llstreamtools_tut.cpp @@ -385,16 +385,15 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; is.clear(); is.str(str = " First Second \t \r \n Third Fourth-ShouldThisBePartOfFourth Fifth\n"); actual_result = ""; - ret = get_word(actual_result, is); // First + get_word(actual_result, is); // First actual_result = ""; - ret = get_word(actual_result, is); // Second + get_word(actual_result, is); // Second actual_result = ""; - ret = get_word(actual_result, is); // Third + get_word(actual_result, is); // Third // the current implementation of get_word seems inconsistent with // skip_to_next_word. skip_to_next_word treats any character other @@ -403,22 +402,22 @@ namespace tut // carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v') // as delimiters actual_result = ""; - ret = get_word(actual_result, is); // will copy Fourth-ShouldThisBePartOfFourth + get_word(actual_result, is); // will copy Fourth-ShouldThisBePartOfFourth actual_result = ""; - ret = get_word(actual_result, is); // will copy Fifth + get_word(actual_result, is); // will copy Fifth is.clear(); is.str(str = " First Second \t \r \n Third Fourth_ShouldThisBePartOfFourth Fifth\n"); - ret = skip_to_next_word(is); // should now point to First - ret = skip_to_next_word(is); // should now point to Second - ret = skip_to_next_word(is); // should now point to Third - ret = skip_to_next_word(is); // should now point to Fourth - ret = skip_to_next_word(is); // should now point to ShouldThisBePartOfFourth + skip_to_next_word(is); // should now point to First + skip_to_next_word(is); // should now point to Second + skip_to_next_word(is); // should now point to Third + skip_to_next_word(is); // should now point to Fourth + skip_to_next_word(is); // should now point to ShouldThisBePartOfFourth expected_result = ""; // will copy ShouldThisBePartOfFourth, the fifth word, // while using get_word above five times result in getting "Fifth" - ret = get_word(expected_result, is); + get_word(expected_result, is); ensure_equals("get_word: skip_to_next_word compatibility", actual_result, expected_result); } @@ -480,39 +479,38 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; is.clear(); is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "First Second \t \r\n"; ensure_equals("get_line: 1", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = " Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"; ensure_equals("get_line: 2", actual_result, expected_result); is.clear(); is.str(str = "\nFirst Line.\n\nSecond Line.\n"); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "\n"; ensure_equals("get_line: First char as newline", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "First Line.\n"; ensure_equals("get_line: 3", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "\n"; ensure_equals("get_line: 4", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "Second Line.\n"; ensure_equals("get_line: 5", actual_result, expected_result); } @@ -544,13 +542,12 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; // need to be check if this test case is wrong or the implementation is wrong. is.clear(); is.str(str = "Should not skip lone \r.\r\n"); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "Should not skip lone \r.\r\n"; ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result); } @@ -563,12 +560,11 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; is.clear(); is.str(str = "\n"); actual_result = ""; - ret = get_line(actual_result, is); + get_line(actual_result, is); expected_result = "\n"; ensure_equals("get_line: Just newline", actual_result, expected_result); } @@ -582,36 +578,35 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; - bool ret; is.clear(); is.str(str = "First Line.\nSecond Line.\n"); actual_result = ""; - ret = get_line(actual_result, is, 255); + get_line(actual_result, is, 255); expected_result = "First Line.\n"; ensure_equals("get_line: Basic Operation", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is, sizeof("Second")-1); + get_line(actual_result, is, sizeof("Second")-1); expected_result = "Second\n"; ensure_equals("get_line: Insufficient length 1", actual_result, expected_result); actual_result = ""; - ret = get_line(actual_result, is, 255); + get_line(actual_result, is, 255); expected_result = " Line.\n"; ensure_equals("get_line: Remainder after earlier insufficient length", actual_result, expected_result); is.clear(); is.str(str = "One Line only with no newline with limited length"); actual_result = ""; - ret = get_line(actual_result, is, sizeof("One Line only with no newline with limited length")-1); + get_line(actual_result, is, sizeof("One Line only with no newline with limited length")-1); expected_result = "One Line only with no newline with limited length\n"; ensure_equals("get_line: No newline with limited length", actual_result, expected_result); is.clear(); is.str(str = "One Line only with no newline"); actual_result = ""; - ret = get_line(actual_result, is, 255); + get_line(actual_result, is, 255); expected_result = "One Line only with no newline"; ensure_equals("get_line: No newline", actual_result, expected_result); } diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 6e1c82bb24..6c0b70edd2 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -937,7 +937,7 @@ namespace tut // build message with single block LLMessageTemplate messageTemplate = defaultTemplate(); messageTemplate.addBlock(defaultBlock(MVT_U32, 4, MBT_SINGLE)); - U32 outValue, outValue2, inValue = 0xbbbbbbbb; + U32 outValue, inValue = 0xbbbbbbbb; LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); builder->addU32(_PREHASH_Test0, inValue); const U32 bufferSize = 1024; @@ -962,7 +962,6 @@ namespace tut memset(buffer, 0xcc, bufferSize); reader->getString(_PREHASH_Test1, _PREHASH_Test0, bufferSize, outBuffer); - outValue2 = reader->getNumberOfBlocks(_PREHASH_Test1); ensure_equals("Ensure present value ", outValue, inValue); ensure_equals("Ensure unchanged buffer ", strlen(outBuffer), 0); delete reader; -- cgit v1.2.3 From 2a03e8f9fb24bb68b79e34bcfa9a45d3e377b0b8 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 20 Sep 2013 16:44:39 -0700 Subject: MAINT-3172 fix rendering regressions from release mergedown --- indra/test/llstreamtools_tut.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/test') diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp index 354c3dfe10..0f6436f0f4 100755 --- a/indra/test/llstreamtools_tut.cpp +++ b/indra/test/llstreamtools_tut.cpp @@ -385,6 +385,7 @@ namespace tut std::string expected_result; std::string actual_result; std::istringstream is; + is.clear(); is.str(str = " First Second \t \r \n Third Fourth-ShouldThisBePartOfFourth Fifth\n"); actual_result = ""; -- cgit v1.2.3