summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/expected_float.xml
Commit message (Collapse)AuthorAgeFilesLines
* QCOMPARE: treat values as equal if qFuzzyIsNull(each)Edward Welbourne2020-04-301-13/+13
| | | | | | | | | | | | | | | | | We hope this shall avoid some flaky failures noticed in quick tests, e.g. tst_QQuickMenu::Material::subMenuPosition(cascading,flip) was recently seen failing with 3.88e-11 != 0. This required some revision to test data in the testlib selftest for floats; the resulting expected output differs in details but not in which tests pass or fail. QEMU, naturally, made life difficult, requiring special-case code in the test-driver. [ChangeLog][QtTestLib][QCOMPARE] QCOMPARE() now treats its values as equal when qFuzzyIsNull() is true for both of them. Change-Id: Icc6ad5164b609937eddbe39cc69120f0abf0f3b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QtTestLib: handle float16 the same as double and floatEdward Welbourne2019-04-241-4/+187
| | | | | | | | | | | | | | | | | | In QCOMPARE, handle NaNs and infinities the way tests want them handled, rather than by strict IEEE rules. In particular, if a test expects NaN, this lets it treat that just like any other expected value, despite NaN != NaN as float16 values. Likewise, format infinities and NaNs specially in toString() so that they're reported consistently. Enable the qfloat16 tests that depend on this QCOMPARE() behavior. Refise the testlib selftest's float test to test qfloat16 the same way it tests float and double (and format the test the same way). This is a follow-up to 37f617c405a. Change-Id: I433256a09b1657e6725d68d07c5f80d805bf586a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtTestLib: unify handling of float and double using suitable templatesEdward Welbourne2019-03-041-3/+3
| | | | | | | | | | | | | | | | | The QTest::qCompare() implementations were almost duplicates; pull the common code out into a templated version. Tweaked the QTest::toString() specialization for float and double (a macro) and fixed a bous modifier in double's format. The doubleComparisons and floatComparisons tests in the tst_float.cpp selftest shared a large block of tests in common, aside from the difference of type. Break this out into a templated static function to save duplication. This prepares the way for using the same templated code for qfloat16. Change-Id: I2823fd006910c5ff88335d625d1fa05cb7753513 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-081-5/+398
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * Add testlib selftests for double and for non-finite float and doubleEdward Welbourne2019-02-061-5/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tidied up the existing float tests in the process. (In particular, s/SUCCESS/PASS/ since that matches real test output.) These verify that QCOMPARE() handles floats and doubles as intended. Extended the existing qFuzzyCompare tests to probe the boundaries of the ranges of values of both types, in the process. Revised the toString<double> that qCompare() uses to give enough precision to actually show some of the differences being tested there (12 digits, to match what qFuzzyCompare tests, so as to show different values rather than, e.g. 1e12 for both expected and actual) and to give consistent results for infinities and NaN (MinGW had eccentric versions for these, leading to different output from tests, which thus failed); did the latter also for toString<float> and fixed stray zeros in MinGW's exponents (which made a kludge in tst_selftest.cpp redundant, so I removed that, too). That's further complicated handling of floating-point types, so let's just keep an eye on how expensive that's getting by adding a benchmark test for QTest::toString(). Unfortunately, default settings only get runs that take modest numbers of milliseconds (some as low as 40) while increasing this with -minumumvalue 100 or more gets the process killed - and I'm unable to find out who's doing the killing (it's not QProcess::kill, ::kill or the QtTest WatchDog, as far as I can tell). So results are rather noisy; the integral tests exhibit speed-ups by factors up to 5, and slow-downs by factors up to 100, between runs with and without this change, which does not affec the integral tests. The relatively modest slow-downs and speed-ups in the floating point tests thus seem likely to be happenstance rather than signal. Change-Id: I4a6bbbab6a43bf14a4089e96238a7c8da2c3127e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Add qfloat16 support to QCOMPAREAllan Sandfeld Jensen2018-11-201-0/+27
|/ | | | | | Change-Id: Ide06f215a888328308a06e7e48edd666f790a5f0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* generate_expected_output.py: update generated expected_* filesEdward Welbourne2017-10-111-0/+65
| | | | | | | | | | | | | | | | | | | In selftests.qrc, imposed alphabetic order (on stem of name, then on suffix, effectively treating . as sorting before any letter) while removing old tests and adding new tests and data. Updated all non-csv files and added many missing files. (Not clear on csv support status; the script seems to have dropped it after 5.6, but the test still uses it.) Left expected_crashes* alone (no new files added, no update to old) as I don't get results resembling those anticipated. Omitted printdatatagswithglobaltags, printdatatags due to dangling hspace on output lines, which upset sanity-bot. A change to the test cpp is needed to make it viable to skip that dangling hspace. Change-Id: Iab3fb626c44a91c249b2fb626c12c75ea0317098 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove unused test results from testlib selftests.Jason McDonald2012-02-091-47/+0
| | | | | | | | | Some of the subtests are only run with plain-text output format. For those subtests, the other output formats were unused and gradually becoming out-of-date. Change-Id: I4c10f7f5bab2d2cc7d2d2ad641fbf5d4df02b798 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Split subtest selftestJason McDonald2011-09-201-0/+47
This test was attempting to verify two completely unrelated things, so this commit splits it into two tests. Also, printf calls are replaced by qDebug so that the test does not bypass the testlib loggers. Change-Id: I1a202af38ce2c69690a32d93405ba604ec6cabee Reviewed-on: http://codereview.qt-project.org/5178 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>