diff options
author | Don Kjer <don@lindenlab.com> | 2012-10-11 00:09:04 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2012-10-11 00:09:04 +0000 |
commit | c06c35609c6683731eaea283468f6b32af18fea2 (patch) | |
tree | 69e067fb2d8d602948d618ec7cb71ace149d6e39 /indra/test | |
parent | 19e43e4b588d4aec8f23498993a3a22c0e08a329 (diff) |
Updating linux build to gcc4.6
Diffstat (limited to 'indra/test')
-rw-r--r-- | indra/test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | indra/test/io.cpp | 8 | ||||
-rw-r--r-- | indra/test/llstreamtools_tut.cpp | 53 | ||||
-rw-r--r-- | indra/test/lltemplatemessagebuilder_tut.cpp | 3 |
4 files changed, 33 insertions, 35 deletions
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; |