qt5base-lts/tests/auto
Edward Welbourne ce159d1a3e Fix toFloat()s between float and double ranges and document
Revised some toFloat()s to be consistent with the matching
toDouble()s; previously, they would return infinity if toDouble() did
but return 0 if toDouble() got a finite value outside float's range.
That also applied to values that underflowed float's range, succeeding
and returning 0 as long as they were within double's range but failing
if toDouble() underflowed.  Now float-underflow also fails.  Amended
their documentation to reflect this more consistent reality.
Added some tests of out-of-range values, infinities and NaNs.

[ChangeLog][QtCore][toFloat] QString, QByteArray and QLocale returned
an infinity on double-overflow (since 5.7) but returned 0 on a finite
double outside float's range, while setting ok to false; this was at
odds with their documented behavior of returning 0 on any failure.
They also succeeded, returning zero, on underflow of float's range,
unless double underflowed, where they failed.  Changed the handling of
values outside float's range to match that of values outside double's
range: fail, returning an infinity on overflow or zero on underflow.
The documentation now reflects the revised behavior, which matches
toDouble().

Change-Id: Ia168bcacf7def0df924840d45d8edc5f850449d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-11-23 10:05:24 +00:00
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for 5.11 for QtBase 2018-06-05 06:00:28 +00:00
cmake tests: Fix top-level CMakeLists.txt 2018-08-15 11:08:34 +00:00
concurrent Fix of flaky qFutureAssignmentLeak test 2018-02-15 16:24:38 +00:00
corelib Fix toFloat()s between float and double ranges and document 2018-11-23 10:05:24 +00:00
dbus tests/auto/dbus: Avoid unconditional qWait()s 2018-04-12 05:49:07 +00:00
gui QSyntaxHighlighter: Delay all highlights until first rehighlight 2018-11-08 16:38:27 +00:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network tst_QNetworkReply: Blacklist getFromHttp:success-external 2018-11-21 16:02:52 +00:00
opengl tst_QGL: Use qWaitForWindowExposed() 2018-04-11 06:05:46 +00:00
other Windows QPA: Fix mapping of static text accessibility role 2018-08-17 08:53:20 +00:00
printsupport If the page size is not valid on the new printer, set a custom size 2018-05-02 13:32:09 +00:00
shared Remove workaround for potentially unavailable pasteboard in macOS 2017-03-07 01:04:46 +00:00
sql sqlite: Fix QSqlError handling when opening/closing database 2018-09-13 18:18:47 +00:00
testlib Make tests compile for Android 2018-06-25 08:01:19 +00:00
tools qmake: make VFS aware of exact vs. cumulative evaluation 2018-03-29 18:15:10 +00:00
widgets Modernize the "animation" feature 2018-10-12 14:26:15 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro tests/auto/auto.pro: Use correct null device for DBUS check 2017-12-01 09:53:07 +00:00
network-settings.h Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-06 15:36:44 +02:00