summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-02-04 14:14:23 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-03-26 06:11:14 +0000
commite1c99e15b6bc3363b748e3845cfb0c5f96f8fe90 (patch)
treee51a91ad0476c27c774ab1761b6bc190261a33b2 /tests
parentf43a624ab840c387c6e26dc6e9259200d0b1a3b7 (diff)
Update strtoll and strtoull from upstream FreeBSD
There appears to be at least one fix, related to sign- or zero-extension in the call to isspace(). So it's a good idea to update again. This also brings the behavior to match strtoll and strtoull on Linux, including the fact that strtoull will parse negative numbers. For that reason, qstrtoll and qstrtoull are now wrappers that try and keep the behavior that we used to have. This update also changes the code from a 4-clause BSD license (bad) to a 3-clause BSD license (good). Change-Id: I73b01b02ebd1551bf924599d52284ad25cc1def0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
index 6d0a65da92..3e16d3b871 100644
--- a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
+++ b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
@@ -209,6 +209,12 @@ void tst_QIpAddress::invalidParseIp4_data()
// bad hex
QTest::newRow("0x1g") << "0x1g";
+ // negative numbers
+ QTest::newRow("-1") << "-1";
+ QTest::newRow("-1.1") << "-1.1";
+ QTest::newRow("1.-1") << "1.-1";
+ QTest::newRow("1.1.1.-1") << "1.1.1.-1";
+
// letters
QTest::newRow("abc") << "abc";
QTest::newRow("1.2.3a.4") << "1.2.3a.4";