diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/test/llstring_tut.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/linden/indra/test/llstring_tut.cpp b/linden/indra/test/llstring_tut.cpp index 191b804..ba6ac7c 100644 --- a/linden/indra/test/llstring_tut.cpp +++ b/linden/indra/test/llstring_tut.cpp | |||
@@ -564,18 +564,21 @@ namespace tut | |||
564 | for (LLStringUtil::format_map_t::const_iterator iter = fmt_map.begin(); iter != fmt_map.end(); ++iter) | 564 | for (LLStringUtil::format_map_t::const_iterator iter = fmt_map.begin(); iter != fmt_map.end(); ++iter) |
565 | { | 565 | { |
566 | // Test when source string is entirely one key | 566 | // Test when source string is entirely one key |
567 | s = iter->first; | 567 | std::string s1 = (std::string)iter->first; |
568 | subcount = LLStringUtil::format(s, fmt_map); | 568 | std::string s2 = (std::string)iter->second; |
569 | ensure_equals("LLStringUtil::format: Raw interpolation result", s, iter->second); | 569 | subcount = LLStringUtil::format(s1, fmt_map); |
570 | ensure_equals("LLStringUtil::format: Raw interpolation result", s1, s2); | ||
570 | ensure_equals("LLStringUtil::format: Raw interpolation result count", 1, subcount); | 571 | ensure_equals("LLStringUtil::format: Raw interpolation result count", 1, subcount); |
571 | } | 572 | } |
572 | 573 | ||
573 | for (LLStringUtil::format_map_t::const_iterator iter = fmt_map.begin(); iter != fmt_map.end(); ++iter) | 574 | for (LLStringUtil::format_map_t::const_iterator iter = fmt_map.begin(); iter != fmt_map.end(); ++iter) |
574 | { | 575 | { |
575 | // Test when source string is one key, duplicated | 576 | // Test when source string is one key, duplicated |
576 | s = iter->first + iter->first + iter->first + iter->first; | 577 | std::string s1 = (std::string)iter->first; |
578 | std::string s2 = (std::string)iter->second; | ||
579 | s = s1 + s1 + s1 + s1; | ||
577 | subcount = LLStringUtil::format(s, fmt_map); | 580 | subcount = LLStringUtil::format(s, fmt_map); |
578 | ensure_equals("LLStringUtil::format: Rawx4 interpolation result", s, iter->second + iter->second + iter->second + iter->second); | 581 | ensure_equals("LLStringUtil::format: Rawx4 interpolation result", s, s2 + s2 + s2 + s2); |
579 | ensure_equals("LLStringUtil::format: Rawx4 interpolation result count", 4, subcount); | 582 | ensure_equals("LLStringUtil::format: Rawx4 interpolation result count", 4, subcount); |
580 | } | 583 | } |
581 | 584 | ||