diff options
author | Tatiana Borisova <tatiana.borisova@qt.io> | 2022-03-12 12:18:26 +0200 |
---|---|---|
committer | Tatiana Borisova <tatiana.borisova@qt.io> | 2022-03-16 20:09:37 +0200 |
commit | 715420095a97acccb5c56281890784d7e08ea8fd (patch) | |
tree | b264e68a7d5a07cdda7832de0f061df58e2d076b /tests/auto | |
parent | 1977c922e9dc8a5402ca056faa68014f87275c18 (diff) |
Fix has_signaling_NaN usage for INTEGRITY
- The newest GHS compiler versions set the value of has_signaling_NaN to False.
Add compilation and autotest fix for GHS-compiler 2021/2022 releases.
Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: I45e5da6759a15c60c17f896e565002cbba8524ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp index ae4c0d05a0..242255d026 100644 --- a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp +++ b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp @@ -550,16 +550,19 @@ void tst_qfloat16::properties() // and the same supposed to be for qfloat16. #if !defined(Q_CC_GHS) QVERIFY(Bounds::is_iec559); -#else +#endif //Q_CC_GHS +#if QT_CONFIG(signaling_nan) // Technically, presence of NaN and infinities are implied from the above check, but that checkings GHS compiler complies. QVERIFY(Bounds::has_infinity && Bounds::has_quiet_NaN && Bounds::has_signaling_NaN); -#endif // Q_CC_GHS +#endif QVERIFY(Bounds::is_bounded); QVERIFY(!Bounds::is_modulo); QVERIFY(!Bounds::traps); QVERIFY(Bounds::has_infinity); QVERIFY(Bounds::has_quiet_NaN); +#if QT_CONFIG(signaling_nan) QVERIFY(Bounds::has_signaling_NaN); +#endif #if !defined(Q_CC_GHS) QCOMPARE(Bounds::has_denorm, std::denorm_present); #else |