summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qlocale
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-03-30 15:28:41 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-04-01 23:11:35 +0200
commit2e044791b8f3c62c32b379f7781799a89165c984 (patch)
tree36f5dd1bfd2b7f7448dc6216cafc8ed09f239fbd /tests/auto/corelib/text/qlocale
parent3a2e3625d1e710795233aff9601ae9219f498edc (diff)
Move some purely floating-point testing from tst_QLocale to tst_QNumeric
The testing of infinity and NaN somewhat duplicated existing tests in tst_QNumeric and, in any case, belongs there. Change-Id: I6b5d1ff9767daf8e4bbe0025d3efab3d74ed35de Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'tests/auto/corelib/text/qlocale')
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 25a5f416b2..a7eb29d2d1 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -90,7 +90,6 @@ private slots:
void long_long_conversion_data();
void long_long_conversion();
void long_long_conversion_extra();
- void testInfAndNan();
void fpExceptions();
void negativeZero_data();
void negativeZero();
@@ -1409,29 +1408,6 @@ void tst_QLocale::long_long_conversion_extra()
QCOMPARE(l.toString((qulonglong)12345), QString("12,345"));
}
-void tst_QLocale::testInfAndNan()
-{
- double neginf = log(0.0);
- double nan = sqrt(-1.0);
-
-#ifdef Q_OS_WIN
- // these cause INVALID floating point exception so we want to clear the status.
- _clear87();
-#endif
-
- QVERIFY(qIsInf(-neginf));
- QVERIFY(!qIsNaN(-neginf));
- QVERIFY(!qIsFinite(-neginf));
-
- QVERIFY(!qIsInf(nan));
- QVERIFY(qIsNaN(nan));
- QVERIFY(!qIsFinite(nan));
-
- QVERIFY(!qIsInf(1.234));
- QVERIFY(!qIsNaN(1.234));
- QVERIFY(qIsFinite(1.234));
-}
-
void tst_QLocale::fpExceptions()
{
// Check that double-to-string conversion doesn't throw floating point