mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 11:06:50 +01:00
Poco 1.9.1 assert true (#2255)
* Rename assert by assertTrue * Update submodules * Missing assertTrue * Rename poco_assertTrue to poco_assert * Rename poco_assertTrue to poco_assert
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
5a1bf5eb4a
commit
960ecb38f0
@@ -69,26 +69,26 @@ private:
|
||||
{
|
||||
T result = 0;
|
||||
if (123 <= std::numeric_limits<T>::max())
|
||||
assert(Poco::strToInt("123", result, 10)); assert(result == 123);
|
||||
assertTrue (Poco::strToInt("123", result, 10)); assertTrue (result == 123);
|
||||
|
||||
assert(Poco::strToInt("0", result, 10)); assert(result == 0);
|
||||
assert(Poco::strToInt("000", result, 10)); assert(result == 0);
|
||||
assertTrue (Poco::strToInt("0", result, 10)); assertTrue (result == 0);
|
||||
assertTrue (Poco::strToInt("000", result, 10)); assertTrue (result == 0);
|
||||
|
||||
if (std::numeric_limits<T>::is_signed && (-123 > std::numeric_limits<T>::min()))
|
||||
{ assert(Poco::strToInt("-123", result, 10)); assert(result == -123); }
|
||||
{ assertTrue (Poco::strToInt("-123", result, 10)); assertTrue (result == -123); }
|
||||
if (0x123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("123", result, 0x10)); assert(result == 0x123); }
|
||||
{ assertTrue (Poco::strToInt("123", result, 0x10)); assertTrue (result == 0x123); }
|
||||
if (0x12ab < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("12AB", result, 0x10)); assert(result == 0x12ab); }
|
||||
{ assertTrue (Poco::strToInt("12AB", result, 0x10)); assertTrue (result == 0x12ab); }
|
||||
if (123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("00", result, 0x10)); assert(result == 0); }
|
||||
{ assertTrue (Poco::strToInt("00", result, 0x10)); assertTrue (result == 0); }
|
||||
if (0123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("123", result, 010)); assert(result == 0123); }
|
||||
{ assertTrue (Poco::strToInt("123", result, 010)); assertTrue (result == 0123); }
|
||||
if (0123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("0123", result, 010)); assert(result == 0123); }
|
||||
{ assertTrue (Poco::strToInt("0123", result, 010)); assertTrue (result == 0123); }
|
||||
|
||||
assert(Poco::strToInt("0", result, 010)); assert(result == 0);
|
||||
assert(Poco::strToInt("000", result, 010)); assert(result == 0);
|
||||
assertTrue (Poco::strToInt("0", result, 010)); assertTrue (result == 0);
|
||||
assertTrue (Poco::strToInt("000", result, 010)); assertTrue (result == 0);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user