diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-07-27 15:17:57 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-07-28 08:24:59 +0800 |
commit | 96a81b5ecbe3bffb582ded930752c0523df5e80a (patch) | |
tree | a87a0bd09fd980562e88150dbfea3819d28d9f12 /indra/test | |
parent | 06e8f0c443c1ba7858d000c6d695b7e988e02053 (diff) | |
parent | ed73208eb96b862b97fa285036edea1e792ca3c6 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.06-atlasaurus' into 2024.06-atlasaurus
Diffstat (limited to 'indra/test')
-rw-r--r-- | indra/test/io.cpp | 36 | ||||
-rw-r--r-- | indra/test/llbuffer_tut.cpp | 32 | ||||
-rw-r--r-- | indra/test/llpermissions_tut.cpp | 6 | ||||
-rw-r--r-- | indra/test/llpipeutil.cpp | 2 | ||||
-rw-r--r-- | indra/test/llsaleinfo_tut.cpp | 12 | ||||
-rw-r--r-- | indra/test/llsdmessagebuilder_tut.cpp | 14 | ||||
-rw-r--r-- | indra/test/llsdmessagereader_tut.cpp | 16 | ||||
-rw-r--r-- | indra/test/llstreamtools_tut.cpp | 2 | ||||
-rw-r--r-- | indra/test/lltemplatemessagebuilder_tut.cpp | 14 | ||||
-rw-r--r-- | indra/test/message_tut.cpp | 2 |
10 files changed, 68 insertions, 68 deletions
diff --git a/indra/test/io.cpp b/indra/test/io.cpp index 412f9ca1d2..3bb549a98a 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -155,7 +155,7 @@ namespace tut void buffer_object::test<1>() { const char HELLO_WORLD[] = "hello world"; - const S32 str_len = strlen(HELLO_WORLD); + const S32 str_len = static_cast<S32>(strlen(HELLO_WORLD)); LLChannelDescriptors ch = mBuffer.nextChannel(); mBuffer.append(ch.in(), (U8*)HELLO_WORLD, str_len); S32 count = mBuffer.countAfter(ch.in(), NULL); @@ -170,7 +170,7 @@ namespace tut void buffer_object::test<2>() { const char HELLO_WORLD[] = "hello world"; - const S32 str_len = strlen(HELLO_WORLD); /* Flawfinder: ignore */ + const S32 str_len = static_cast<S32>(strlen(HELLO_WORLD)); /* Flawfinder: ignore */ LLChannelDescriptors ch = mBuffer.nextChannel(); mBuffer.append(ch.in(), (U8*)HELLO_WORLD, str_len); mBuffer.append(ch.in(), (U8*)HELLO_WORLD, str_len); @@ -249,15 +249,15 @@ namespace tut expected << "ContentLength: " << response.length() << "\r\n\r\n" << response; LLChannelDescriptors ch = mBuffer.nextChannel(); - mBuffer.append(ch.in(), (U8*)request.c_str(), request.length()); - mBuffer.append(ch.out(), (U8*)response.c_str(), response.length()); + mBuffer.append(ch.in(), (U8*)request.c_str(), static_cast<S32>(request.length())); + mBuffer.append(ch.out(), (U8*)response.c_str(), static_cast<S32>(response.length())); S32 count = mBuffer.countAfter(ch.out(), NULL); std::ostringstream header; header << "ContentLength: " << count << "\r\n\r\n"; std::string head(header.str()); - mBuffer.prepend(ch.out(), (U8*)head.c_str(), head.length()); + mBuffer.prepend(ch.out(), (U8*)head.c_str(), static_cast<S32>(head.length())); char buffer[1024]; /* Flawfinder: ignore */ - S32 len = response.size() + head.length(); + S32 len = static_cast<S32>(response.size() + head.length()); ensure_equals("same length", len, (S32)expected.str().length()); mBuffer.readAfter(ch.out(), NULL, (U8*)buffer, len); buffer[len] = '\0'; @@ -282,7 +282,7 @@ namespace tut text.append(lines[i]); } LLChannelDescriptors ch = mBuffer.nextChannel(); - mBuffer.append(ch.in(), (U8*)text.c_str(), text.length()); + mBuffer.append(ch.in(), (U8*)text.c_str(), static_cast<S32>(text.length())); const S32 BUFFER_LEN = 1024; char buf[BUFFER_LEN]; S32 len; @@ -411,7 +411,7 @@ namespace tut void bas_object::test<1>() { const char HELLO_WORLD[] = "hello world"; - const S32 str_len = strlen(HELLO_WORLD); /* Flawfinder: ignore */ + const S32 str_len = static_cast<S32>(strlen(HELLO_WORLD)); /* Flawfinder: ignore */ LLChannelDescriptors ch = mBuffer.nextChannel(); LLBufferStream str(ch, &mBuffer); mBuffer.append(ch.in(), (U8*)HELLO_WORLD, str_len); @@ -431,10 +431,10 @@ namespace tut std::string ignore("ignore me"); LLChannelDescriptors ch = mBuffer.nextChannel(); LLBufferStream str(ch, &mBuffer); - mBuffer.append(ch.in(), (U8*)part1.c_str(), part1.length()); - mBuffer.append(ch.in(), (U8*)part2.c_str(), part2.length()); - mBuffer.append(ch.out(), (U8*)ignore.c_str(), ignore.length()); - mBuffer.append(ch.in(), (U8*)part3.c_str(), part3.length()); + mBuffer.append(ch.in(), (U8*)part1.c_str(), static_cast<S32>(part1.length())); + mBuffer.append(ch.in(), (U8*)part2.c_str(), static_cast<S32>(part2.length())); + mBuffer.append(ch.out(), (U8*)ignore.c_str(), static_cast<S32>(ignore.length())); + mBuffer.append(ch.in(), (U8*)part3.c_str(), static_cast<S32>(part3.length())); std::string eat; std::string my; std::string shorts; @@ -452,8 +452,8 @@ namespace tut std::string part1("junk in "); std::string part2("the trunk"); const S32 CHANNEL = 0; - mBuffer.append(CHANNEL, (U8*)part1.c_str(), part1.length()); - mBuffer.append(CHANNEL, (U8*)part2.c_str(), part2.length()); + mBuffer.append(CHANNEL, (U8*)part1.c_str(), static_cast<S32>(part1.length())); + mBuffer.append(CHANNEL, (U8*)part2.c_str(), static_cast<S32>(part2.length())); U8* last = 0; const S32 BUF_LEN = 128; char buf[BUF_LEN]; @@ -475,7 +475,7 @@ namespace tut { std::string phrase("zippity do da!"); const S32 CHANNEL = 0; - mBuffer.append(CHANNEL, (U8*)phrase.c_str(), phrase.length()); + mBuffer.append(CHANNEL, (U8*)phrase.c_str(), static_cast<S32>(phrase.length())); const S32 BUF_LEN = 128; char buf[BUF_LEN]; S32 len = 7; @@ -506,7 +506,7 @@ namespace tut const S32 BUF_LEN = 128; char buf[BUF_LEN]; S32 actual_len = BUF_LEN; - S32 expected_len = h1.size() + h2.size(); + S32 expected_len = static_cast<S32>(h1.size() + h2.size()); (void) mBuffer.readAfter(ch.out(), NULL, (U8*)buf, actual_len); ensure_equals("streamed size", actual_len, expected_len); buf[actual_len] = '\0'; @@ -728,7 +728,7 @@ namespace tut "'circuit_code': i124,'group_id': '8615c885-9cf0-bf0a-6e40-0c11462aa652','limited_to_estate': i1,'look_at': [ i0, i0, i0]," "'agent_id': '0e346d8b-4433-4d66-a6b0-fd37083abc4c','first_name': 'Kelly','start': 'url'}]}"; LLChannelDescriptors ch = mBuffer.nextChannel(); - mBuffer.append(ch.out(), (U8*)LOGIN_STREAM, strlen(LOGIN_STREAM)); /* Flawfinder: ignore */ + mBuffer.append(ch.out(), (U8*)LOGIN_STREAM, static_cast<S32>(strlen(LOGIN_STREAM))); /* Flawfinder: ignore */ ch = mBuffer.nextChannel(); LLBufferStream istr(ch, &mBuffer); LLSD data; @@ -1130,7 +1130,7 @@ namespace tut mPump->addChain(chain, NEVER_CHAIN_EXPIRY_SECS); // We need to tickle the pump a little to set up the listen() pump_loop(mPump, 0.1f); - U32 count = mPump->runningChains(); + auto count = mPump->runningChains(); ensure_equals("server chain onboard", count, 1); LL_DEBUGS() << "** Server is up." << LL_ENDL; diff --git a/indra/test/llbuffer_tut.cpp b/indra/test/llbuffer_tut.cpp index a31870241c..330a4f288f 100644 --- a/indra/test/llbuffer_tut.cpp +++ b/indra/test/llbuffer_tut.cpp @@ -62,7 +62,7 @@ namespace tut ensure("LLSegment get functions failed", (0 == segment.getChannel() && NULL == segment.data() && 0 == segment.size())); segment.setChannel(50); ensure_equals("LLSegment setChannel() function failed", segment.getChannel(), 50); - ensure("LLSegment isOnChannel() function failed", (TRUE == segment.isOnChannel(50))); + ensure("LLSegment isOnChannel() function failed", (true == segment.isOnChannel(50))); } template<> template<> @@ -74,7 +74,7 @@ namespace tut LLSegment segment(channel, (U8*)str, len); ensure("LLSegment get functions failed", (30 == segment.getChannel() && len == segment.size() && (U8*)str == segment.data())); ensure_memory_matches("LLSegment::data() failed", segment.data(), segment.size(), (U8*)str, len); - ensure("LLSegment isOnChannel() function failed", (TRUE == segment.isOnChannel(channel))); + ensure("LLSegment isOnChannel() function failed", (true == segment.isOnChannel(channel))); } template<> template<> @@ -91,27 +91,27 @@ namespace tut S32 requestSize; requestSize = 16384-1; - ensure("1. LLHeapBuffer createSegment failed", (TRUE == buf.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); + ensure("1. LLHeapBuffer createSegment failed", (true == buf.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); // second request for remainign 1 byte requestSize = 1; - ensure("2. LLHeapBuffer createSegment failed", (TRUE == buf.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); + ensure("2. LLHeapBuffer createSegment failed", (true == buf.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); // it should fail now. requestSize = 1; - ensure("3. LLHeapBuffer createSegment failed", (FALSE == buf.createSegment(channel, requestSize, segment))); + ensure("3. LLHeapBuffer createSegment failed", (false == buf.createSegment(channel, requestSize, segment))); LLHeapBuffer buf1(bigSize); // requst for more than default size but less than total sizeit should fail now. requestSize = 16384 + 1; - ensure("4. LLHeapBuffer createSegment failed", (TRUE == buf1.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); + ensure("4. LLHeapBuffer createSegment failed", (true == buf1.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); LLHeapBuffer buf2((U8*) str, smallSize); requestSize = smallSize; - ensure("5. LLHeapBuffer createSegment failed", (TRUE == buf2.createSegment(channel, requestSize, segment)) && segment.size() == requestSize && memcmp(segment.data(), (U8*) str, requestSize) == 0); + ensure("5. LLHeapBuffer createSegment failed", (true == buf2.createSegment(channel, requestSize, segment)) && segment.size() == requestSize && memcmp(segment.data(), (U8*) str, requestSize) == 0); requestSize = smallSize+1; - ensure("6. LLHeapBuffer createSegment failed", (FALSE == buf2.createSegment(channel, requestSize, segment))); + ensure("6. LLHeapBuffer createSegment failed", (false == buf2.createSegment(channel, requestSize, segment))); } //makeChannelConsumer() @@ -128,7 +128,7 @@ namespace tut { LLBufferArray bufferArray; const char array[] = "SecondLife"; - S32 len = strlen(array); + S32 len = static_cast<S32>(strlen(array)); LLChannelDescriptors channelDescriptors = bufferArray.nextChannel(); bufferArray.append(channelDescriptors.in(), (U8*)array, len); S32 count = bufferArray.countAfter(channelDescriptors.in(), NULL); @@ -141,9 +141,9 @@ namespace tut { LLBufferArray bufferArray; const char array[] = "SecondLife"; - S32 len = strlen(array); + S32 len = static_cast<S32>(strlen(array)); const char array1[] = "LindenLabs"; - S32 len1 = strlen(array1); + S32 len1 = static_cast<S32>(strlen(array1)); std::string str(array1); str.append(array); @@ -166,9 +166,9 @@ namespace tut { LLBufferArray bufferArray; const char array[] = "SecondLife"; - S32 len = strlen(array); + S32 len = static_cast<S32>(strlen(array)); const char array1[] = "LindenLabs"; - S32 len1 = strlen(array1); + S32 len1 = static_cast<S32>(strlen(array1)); std::string str(array); str.append(array1); @@ -190,7 +190,7 @@ namespace tut { LLBufferArray bufferArray; const char array[] = "SecondLife"; - S32 len = strlen(array) + 1; + S32 len = static_cast<S32>(strlen(array)) + 1; std::string str(array); LLChannelDescriptors channelDescriptors = bufferArray.nextChannel(); bufferArray.append(channelDescriptors.in(), (U8*)array, len); @@ -208,7 +208,7 @@ namespace tut void buffer_object_t::test<10>() { const char array[] = "SecondLife is a Virtual World"; - S32 len = strlen(array); + S32 len = static_cast<S32>(strlen(array)); LLBufferArray bufferArray; bufferArray.append(0, (U8*)array, len); @@ -229,7 +229,7 @@ namespace tut void buffer_object_t::test<11>() { const char array[] = "SecondLife is a Virtual World"; - S32 len = strlen(array); + S32 len = static_cast<S32>(strlen(array)); LLBufferArray bufferArray; bufferArray.append(0, (U8*)array, len); diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp index ebee89f9fa..1328939004 100644 --- a/indra/test/llpermissions_tut.cpp +++ b/indra/test/llpermissions_tut.cpp @@ -199,7 +199,7 @@ namespace tut { LLPermissions perm1; LLUUID uuid; - BOOL is_group_owned = FALSE; + bool is_group_owned = false; ensure("1:getOwnership:failed ", ! perm1.getOwnership(uuid,is_group_owned)); LLPermissions perm; @@ -262,7 +262,7 @@ namespace tut { LLPermissions perm; LLUUID agent; - BOOL set = 1; + bool set = true; U32 bits = PERM_TRANSFER | PERM_MODIFY; ensure("setBaseBits():failed ", perm.setBaseBits(agent, set, bits)); ensure("setOwnerBits():failed ", perm.setOwnerBits(agent, set, bits)); @@ -278,7 +278,7 @@ namespace tut LLPermissions perm; LLUUID agent; LLUUID group("9c8eca51-53d5-42a7-bb58-cef070395db8"); - BOOL set = 1; + bool set = true; U32 bits = 10; ensure("setGroupBits():failed ", perm.setGroupBits(agent,group, set, bits)); ensure("setEveryoneBits():failed ", perm.setEveryoneBits(agent,group, set, bits)); diff --git a/indra/test/llpipeutil.cpp b/indra/test/llpipeutil.cpp index c64cf21326..1dd4bdfa3c 100644 --- a/indra/test/llpipeutil.cpp +++ b/indra/test/llpipeutil.cpp @@ -60,7 +60,7 @@ LLIOPipe::EStatus LLPipeStringInjector::process_impl( LLSD& context, LLPumpIO* pump) { - buffer->append(channels.out(), (U8*) mString.data(), mString.size()); + buffer->append(channels.out(), (U8*) mString.data(), static_cast<S32>(mString.size())); eos = true; return STATUS_DONE; } diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp index 1a4ead00b6..1da7101aa3 100644 --- a/indra/test/llsaleinfo_tut.cpp +++ b/indra/test/llsaleinfo_tut.cpp @@ -54,7 +54,7 @@ namespace tut LLSaleInfo saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("1. The getSaleType() fn failed", LLSaleInfo::FS_COPY == llsaleinfo.getSaleType()); - ensure("2. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("2. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("3. The getSalePrice() fn failed", sale_price == llsaleinfo.getSalePrice()); ensure("4. The getCRC32() fn failed", 235833404 == llsaleinfo.getCRC32()); ensure("5. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_COPY == llsaleinfo.lookup(sale)); @@ -68,7 +68,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("8. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_ORIGINAL == llsaleinfo.getSaleType()); - ensure("9. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("9. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("10. The getSalePrice() fn failed", 10000000 == llsaleinfo.getSalePrice()); ensure("11. The getCRC32() fn failed", 127911702 == llsaleinfo.getCRC32()); ensure("12. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_CONTENTS == llsaleinfo.lookup(sale)); @@ -82,7 +82,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("15. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_CONTENTS == llsaleinfo.getSaleType()); - ensure("16. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("16. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("17. The getSalePrice() fn failed", 55000550 == llsaleinfo.getSalePrice()); ensure("18. The getCRC32() fn failed", 408735656 == llsaleinfo.getCRC32()); ensure("19. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_ORIGINAL == llsaleinfo.lookup(sale)); @@ -96,7 +96,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("22. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_NOT == llsaleinfo.getSaleType()); - ensure("23. LLSaleInfo::isForSale() fn failed", FALSE == llsaleinfo.isForSale()); + ensure("23. LLSaleInfo::isForSale() fn failed", false == llsaleinfo.isForSale()); ensure("24. The getSalePrice() fn failed", 0 == llsaleinfo.getSalePrice()); ensure("25. The getCRC32() fn failed", 0 == llsaleinfo.getCRC32()); ensure("26. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_NOT == llsaleinfo.lookup(sale)); @@ -116,7 +116,7 @@ namespace tut std::istringstream istream(ostream.str()); LLSaleInfo llsaleinfo1; U32 perm_mask = 0; - BOOL has_perm_mask = FALSE; + bool has_perm_mask = false; llsaleinfo1.importLegacyStream(istream, has_perm_mask, perm_mask); ensure("importStream() fn failed ", @@ -133,7 +133,7 @@ namespace tut LLSD sd_result = saleinfo.asLLSD(); U32 perm_mask = 0 ; - BOOL has_perm_mask = FALSE; + bool has_perm_mask = false; LLSaleInfo saleinfo1; saleinfo1.fromLLSD( sd_result, has_perm_mask, perm_mask); diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp index d85d460198..6804c3e29e 100644 --- a/indra/test/llsdmessagebuilder_tut.cpp +++ b/indra/test/llsdmessagebuilder_tut.cpp @@ -126,14 +126,14 @@ namespace tut template<> template<> void LLSDMessageBuilderTestObject::test<2>() - // BOOL + // bool { - BOOL outValue, inValue = TRUE; + bool outValue, inValue = true; LLSDMessageBuilder builder = defaultBuilder(); builder.addBOOL("var", inValue); LLSDMessageReader reader = setReader(builder); reader.getBOOL("block", "var", outValue); - ensure_equals("Ensure BOOL", inValue, outValue); + ensure_equals("Ensure bool", inValue, outValue); } template<> template<> @@ -688,13 +688,13 @@ namespace tut template<> template<> void LLSDMessageBuilderTestObject::test<39>() { - BOOL valueTrue = true; - BOOL valueFalse = false; + bool valueTrue = true; + bool valueFalse = false; LLMsgData* md = new LLMsgData("testMessage"); LLMsgBlkData* mbd = new LLMsgBlkData("testBlock", 0); - addValue(mbd, (char *)"testBoolFalse", &valueFalse, MVT_BOOL, sizeof(BOOL)); - addValue(mbd, (char *)"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(); diff --git a/indra/test/llsdmessagereader_tut.cpp b/indra/test/llsdmessagereader_tut.cpp index 1d39fed0cb..dd6520ea33 100644 --- a/indra/test/llsdmessagereader_tut.cpp +++ b/indra/test/llsdmessagereader_tut.cpp @@ -73,11 +73,11 @@ namespace tut const std::string& block, const std::string& var, S32 blocknum, - BOOL expected) + bool expected) { LLSDMessageReader msg; msg.setMessage("fakename", msg_data); - BOOL test_data; + bool test_data; msg.getBOOL(block.c_str(), var.c_str(), test_data, blocknum); ensure_equals( "Ensure bool field", test_data, expected); } @@ -118,8 +118,8 @@ namespace tut { LLSD message = LLSD::emptyMap(); message["block1"] = LLSD::emptyArray(); - BOOL bool_true = TRUE; - BOOL bool_false = FALSE; + bool bool_true = true; + bool bool_false = false; message["block1"][0] = LLSD::emptyMap(); message["block1"][0]["BoolField1"] = bool_true; message["block1"][1] = LLSD::emptyMap(); @@ -127,9 +127,9 @@ namespace tut message["block1"][1]["BoolField2"] = bool_true; ensureMessageName("name3", message, "name3"); - ensureBool(message, "block1", "BoolField1", 0, TRUE); - ensureBool(message, "block1", "BoolField1", 1, FALSE); - ensureBool(message, "block1", "BoolField2", 1, TRUE); + ensureBool(message, "block1", "BoolField1", 0, true); + ensureBool(message, "block1", "BoolField1", 1, false); + ensureBool(message, "block1", "BoolField2", 1, true); ensureNumberOfBlocks(message, "block1", 2); ensureMessageSize(message, 0); } @@ -318,7 +318,7 @@ namespace tut inValue[1] = 1; LLSDMessageReader msg = testType(inValue); - msg.getBinaryData("block", "var", &(outValue[0]), inValue.size()); + msg.getBinaryData("block", "var", &(outValue[0]), static_cast<S32>(inValue.size())); ensure_equals("Ensure Binary", outValue, inValue); } } diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp index 68bd5e0ec9..970afb3b02 100644 --- a/indra/test/llstreamtools_tut.cpp +++ b/indra/test/llstreamtools_tut.cpp @@ -846,7 +846,7 @@ namespace tut char buf[255] = {0}; fullread(is, buf, 255); - ensure_memory_matches("fullread: read with newlines", (void*) buf, str.size()-1, (void*) str.c_str(), str.size()-1); + ensure_memory_matches("fullread: read with newlines", (void*) buf, static_cast<U32>(str.size())-1, (void*) str.c_str(), static_cast<U32>(str.size())-1); is.clear(); is.str(str = "First Line.\nSecond Line\n"); diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 67bdbb09b3..ddf1c3dbcc 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -61,7 +61,7 @@ namespace tut 1, 0, 0, - FALSE, + false, "notasharedsecret", NULL, false, @@ -135,16 +135,16 @@ namespace tut template<> template<> void LLTemplateMessageBuilderTestObject::test<2>() - // BOOL + // bool { LLMessageTemplate messageTemplate = defaultTemplate(); messageTemplate.addBlock(defaultBlock(MVT_BOOL, 1)); - BOOL outValue, inValue = TRUE; + bool outValue, inValue = true; LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); builder->addBOOL(_PREHASH_Test0, inValue); LLTemplateMessageReader* reader = setReader(messageTemplate, builder); reader->getBOOL(_PREHASH_Test0, _PREHASH_Test0, outValue); - ensure_equals("Ensure BOOL", inValue, outValue); + ensure_equals("Ensure bool", inValue, outValue); delete reader; } @@ -591,17 +591,17 @@ namespace tut template<> template<> void LLTemplateMessageBuilderTestObject::test<26>() - // non-zero offset with BOOL + // non-zero offset with bool { LLMessageTemplate messageTemplate = defaultTemplate(); messageTemplate.addBlock(defaultBlock(MVT_BOOL, 1)); - BOOL outValue, inValue = TRUE; + bool outValue, inValue = true; LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); builder->addBOOL(_PREHASH_Test0, inValue); LLTemplateMessageReader* reader = setReader( messageTemplate, builder, 1); reader->getBOOL(_PREHASH_Test0, _PREHASH_Test0, outValue); - ensure_equals("Ensure BOOL", inValue, outValue); + ensure_equals("Ensure bool", inValue, outValue); delete reader; } diff --git a/indra/test/message_tut.cpp b/indra/test/message_tut.cpp index 96308b54af..11cd710ef6 100644 --- a/indra/test/message_tut.cpp +++ b/indra/test/message_tut.cpp @@ -75,7 +75,7 @@ namespace tut 1, 0, 0, - FALSE, + false, "notasharedsecret", NULL, false, |