Update POCO to 1.11.0

This commit is contained in:
Sandu Liviu Catalin committed 2021-08-22 18:07:06 +03:00
1 parent 151077c799
commit 7a3d92d1d1
450 files changed
+25219 -6528

No files matched your search

+35 -5
View File
@@ -8,6 +8,11 @@
//
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif
#include "StringTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
@@ -89,8 +94,12 @@ void StringTest::testTrimLeft()
std::string s = " abc ";
assertTrue (trimLeft(s) == "abc ");
{
std::string s = " ab c ";
assertTrue (trimLeft(s) == "ab c ");
std::string s = " ab c ";
assertTrue (trimLeft(s) == "ab c ");
}
{
std::string s;
assertTrue (trimLeft(s) == "");
}
}
@@ -109,6 +118,10 @@ void StringTest::testTrimLeftInPlace()
std::string s = " ab c ";
assertTrue (trimLeftInPlace(s) == "ab c ");
}
{
std::string s;
assertTrue (trimLeftInPlace(s) == "");
}
}
@@ -126,6 +139,10 @@ void StringTest::testTrimRight()
std::string s = " ab c ";
assertTrue (trimRight(s) == " ab c");
}
{
std::string s;
assertTrue (trimRight(s) == "");
}
}
@@ -143,6 +160,10 @@ void StringTest::testTrimRightInPlace()
std::string s = " ab c ";
assertTrue (trimRightInPlace(s) == " ab c");
}
{
std::string s;
assertTrue (trimRightInPlace(s) == "");
}
}
@@ -160,6 +181,10 @@ void StringTest::testTrim()
std::string s = " ab c ";
assertTrue (trim(s) == "ab c");
}
{
std::string s;
assertTrue (trim(s) == "");
}
}
@@ -177,6 +202,10 @@ void StringTest::testTrimInPlace()
std::string s = " ab c ";
assertTrue (trimInPlace(s) == "ab c");
}
{
std::string s;
assertTrue (trimInPlace(s) == "");
}
}
@@ -783,6 +812,7 @@ void StringTest::testNumericStringPadding()
{
std::string str;
assertTrue (floatToStr(str, 0.999f, 2, 4) == "1.00");
assertTrue (floatToStr(str, 0.999f, 2, 4, '.', ',') == "1,00");
assertTrue (floatToStr(str, 0.945f, 2, 4) == "0.95");
assertTrue (floatToStr(str, 0.944f, 2, 4) == "0.94");
assertTrue (floatToStr(str, 12.45f, 2, 5) == "12.45");
@@ -800,6 +830,7 @@ void StringTest::testNumericStringPadding()
assertTrue (doubleToStr(str, 12.45, 2, 6) == " 12.45");
assertTrue (doubleToStr(str, 12.455, 3, 7) == " 12.455");
assertTrue (doubleToStr(str, 12.455, 2, 6) == " 12.46");
assertTrue (doubleToStr(str, 12345.678, 3, 6, '.', ',') == "12.345,678");
assertTrue (doubleToStr(str, 1.23556E-16, 2, 6) == "1.24e-16");
}
@@ -1378,7 +1409,6 @@ void StringTest::testJSONString()
{
assertTrue (toJSON("\\", false) == "\\\\");
assertTrue (toJSON("\"", false) == "\\\"");
assertTrue (toJSON("/", false) == "\\/");
assertTrue (toJSON("\a", false) == "\\u0007");
assertTrue (toJSON("\b", false) == "\\b");
assertTrue (toJSON("\f", false) == "\\f");
@@ -1395,7 +1425,7 @@ void StringTest::testJSONString()
std::string str = "\"foo\\\\\"";
assertTrue (toJSON("foo\\") == str);
assertTrue (toJSON("bar/") == "\"bar\\/\"");
assertTrue (toJSON("bar/") == "\"bar/\"");
assertTrue (toJSON("baz") == "\"baz\"");
assertTrue (toJSON("q\"uote\"d") == "\"q\\\"uote\\\"d\"");
assertTrue (toJSON("bs\b") == "\"bs\\b\"");
@@ -1412,7 +1442,7 @@ void StringTest::testJSONString()
ostr.str("");
toJSON("foo\\", ostr);
assertTrue (toJSON("bar/") == "\"bar\\/\"");
assertTrue (toJSON("bar/") == "\"bar/\"");
ostr.str("");
toJSON("baz", ostr);
assertTrue (ostr.str() == "\"baz\"");