see CHANGELOG

- added Poco::istring (case-insensitive string) and Poco::isubstr
(case-insensitive substring search)
- improved SQLite execute() return (affected rows) value
- added SQLite sys.dual (in-memory system table)
- applied SF Patch #120: The ExpireLRUCache does not compile with a
tuple as key on Visual Studio 2010
- fixed SF Bug #599: JSON::Array and JSON::Object size() member can
implicitly lose precision
- fixed SF Bug #602: iterating database table rows not correct if no
data in table
- fixed SF Bug #603: count() is missing in HashMap
- fixed GH #23: JSON::Object::stringify throw BadCastException
- fixed GH #16: NetworkInterface::firstAddress() should not throw on
unconfigured interfaces
- Android compile/build support (by Rangel Reale)
- TypeHandler::prepare() now takes const-reference
This commit is contained in:
aleks-f
2012-12-04 23:33:44 -06:00
parent 1138f439af
commit eaa74307a6
19 changed files with 473 additions and 255 deletions

View File

@@ -1,4 +1,4 @@
//
//
// StringTest.cpp
//
// $Id: //poco/1.4/Foundation/testsuite/src/StringTest.cpp#1 $
@@ -54,6 +54,8 @@ using Poco::toUpperInPlace;
using Poco::toLower;
using Poco::toLowerInPlace;
using Poco::icompare;
using Poco::istring;
using Poco::isubstr;
using Poco::translate;
using Poco::translateInPlace;
using Poco::replace;
@@ -228,6 +230,36 @@ void StringTest::testToLower()
}
void StringTest::testIstring()
{
istring is1 = "AbC";
istring is2 = "aBc";
assert (is1 == is2);
const char c1[] = { 'G', 0, (char) 0xFC, 'n', 't', 'e', 'r', '\0' };
const char c2[] = { 'g', 0, (char) 0xDC, 'N', 'T', 'E', 'R', '\0' };
is1 = c1;
is2 = c2;
assert (is1 == is2);
is1[0] = 'f';
assert (is1 < is2);
is1[0] = 'F';
assert (is1 < is2);
is1[0] = 'H';
assert (is1 > is2);
is1[0] = 'h';
assert (is1 > is2);
is1 = "aAaBbBcCc";
is2 = "bbb";
assert (isubstr(is1, is2) == 3);
is2 = "bC";
assert (isubstr(is1, is2) == 5);
is2 = "xxx";
assert (isubstr(is1, is2) == istring::npos);
}
void StringTest::testIcompare()
{
std::string s1 = "AAA";
@@ -1044,6 +1076,7 @@ CppUnit::Test* StringTest::suite()
CppUnit_addTest(pSuite, StringTest, testTrimRightInPlace);
CppUnit_addTest(pSuite, StringTest, testToUpper);
CppUnit_addTest(pSuite, StringTest, testToLower);
CppUnit_addTest(pSuite, StringTest, testIstring);
CppUnit_addTest(pSuite, StringTest, testIcompare);
CppUnit_addTest(pSuite, StringTest, testTranslate);
CppUnit_addTest(pSuite, StringTest, testTranslateInPlace);