summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global/qfloat16
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-28 11:46:30 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-28 18:12:07 +0200
commitd782df48612a932f03a579c889670d34c26e9574 (patch)
treec27f330cce93aa86a5b4974d7a4d6edd0b2bc6d9 /tests/auto/corelib/global/qfloat16
parentf16613f7ef34769181ac19a45b5c42059e63572f (diff)
Make qfloat16 helper functions consistent with float/double versions
Infinite is only when the mantissa is 0, everything else is NaN. std::isnormal returns false on zero. Pick-to: 5.15 Change-Id: I897fc0dc3b8a9c557bb1922ea7ca8df501e91859 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/global/qfloat16')
-rw-r--r--tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
index a661b0388e..99f539f341 100644
--- a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
+++ b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp
@@ -423,7 +423,7 @@ void tst_qfloat16::finite()
{
QFETCH(qfloat16, value);
QFETCH(int, mode);
- QCOMPARE(value.isNormal(), mode != FP_SUBNORMAL);
+ QCOMPARE(value.isNormal(), mode == FP_NORMAL);
QCOMPARE(value, value); // Fuzzy
QVERIFY(value == value); // Exact
QVERIFY(qIsFinite(value));