diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-18 17:10:03 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-02-16 17:27:55 +0000 |
commit | 9760f881c54e601c56d606b6fe276def9531a43d (patch) | |
tree | dff12c1fdfe6a7db384c7820d77cbec7b8571211 /tests/auto/testlib/selftests/expected_cmptest.txt | |
parent | 21e5da2fe0a3c9450de60b846d2f0836e4455976 (diff) |
QTestlib: Add formatting for QFlags<>
Add formatting for registered enumerations based on QMetaEnum
and unregistered enumerations as hex values.
[ChangeLog][QtTest] QtTest now prints values of QFlags that failed to
compare with QCOMPARE.
Task-number: QTBUG-65845
Change-Id: I3eae6d20d3c0d72441ca6c4037d9a8dafa4b6357
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/expected_cmptest.txt')
-rw-r--r-- | tests/auto/testlib/selftests/expected_cmptest.txt | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt index 78df990dea..e1aa81c1a1 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.txt +++ b/tests/auto/testlib/selftests/expected_cmptest.txt @@ -11,6 +11,24 @@ FAIL! : tst_Cmptest::compare_class_enums() Compared values are not the same Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1 Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2 Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +PASS : tst_Cmptest::test_windowflags(pass) +FAIL! : tst_Cmptest::test_windowflags(fail1) Compared values are not the same + Actual (actualWindowFlags) : Window|WindowSystemMenuHint|WindowStaysOnBottomHint + Expected (expectedWindowFlags): Window|FramelessWindowHint|WindowSystemMenuHint|WindowStaysOnBottomHint + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +FAIL! : tst_Cmptest::test_windowflags(fail2) Compared values are not the same + Actual (actualWindowFlags) : Window + Expected (expectedWindowFlags): Window|FramelessWindowHint + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +PASS : tst_Cmptest::test_unregistered_flags(pass) +FAIL! : tst_Cmptest::test_unregistered_flags(fail1) Compared values are not the same + Actual (actualFlags) : 0x3 + Expected (expectedFlags): 0x5 + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] +FAIL! : tst_Cmptest::test_unregistered_flags(fail2) Compared values are not the same + Actual (actualFlags) : 0x1 + Expected (expectedFlags): 0x5 + Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] PASS : tst_Cmptest::compare_boolfuncs() PASS : tst_Cmptest::compare_to_nullptr() PASS : tst_Cmptest::compare_pointerfuncs() @@ -138,5 +156,5 @@ FAIL! : tst_Cmptest::tryVerify2() 'opaqueFunc() < 2' returned FALSE. (42) Loc: [qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(0)] PASS : tst_Cmptest::verifyExplicitOperatorBool() PASS : tst_Cmptest::cleanupTestCase() -Totals: 16 passed, 34 failed, 0 skipped, 0 blacklisted, 0ms +Totals: 18 passed, 38 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_Cmptest ********* |