d25589e052
It is unnecessary to create a QList container just for comparison. Split out helpers for comparing sequence sizes and sequences from qCompare(QList) and add a template for an array with a non-type template parameter for the size. One can then write something like: const int expected[] = {10, 12,...}; QCOMPARE(QFontDatabase.pointSizes(...), expected) Unfortunately, any commas in such an array will be misread by macro expansion as macro argument separators, so any expected array with more than one entry needs an extra macro expanding __VA_ARGS__. Change-Id: Ie7c8dc20bf669bbb25f6d7f8562455f8d03968c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
181 lines
8.8 KiB
XML
181 lines
8.8 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<testsuite errors="0" failures="45" tests="28" name="tst_Cmptest">
|
|
<properties>
|
|
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
|
|
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
|
|
<property value="" name="QtBuild"/>
|
|
</properties>
|
|
<testcase result="pass" name="initTestCase"/>
|
|
<testcase result="fail" name="compare_unregistered_enums">
|
|
<failure message="Compared values are not the same" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compare_registered_enums">
|
|
<failure message="Compared values are not the same
|
|
Actual (Qt::Monday): Monday
|
|
Expected (Qt::Sunday): Sunday" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compare_class_enums">
|
|
<failure message="Compared values are not the same
|
|
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
|
|
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="test_windowflags">
|
|
<failure tag="fail1" message="Compared values are not the same
|
|
Actual (actualWindowFlags) : Window|WindowSystemMenuHint|WindowStaysOnBottomHint
|
|
Expected (expectedWindowFlags): Window|FramelessWindowHint|WindowSystemMenuHint|WindowStaysOnBottomHint" result="fail"/>
|
|
<failure tag="fail2" message="Compared values are not the same
|
|
Actual (actualWindowFlags) : Window
|
|
Expected (expectedWindowFlags): Window|FramelessWindowHint" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="test_unregistered_flags">
|
|
<failure tag="fail1" message="Compared values are not the same
|
|
Actual (actualFlags) : 0x3
|
|
Expected (expectedFlags): 0x5" result="fail"/>
|
|
<failure tag="fail2" message="Compared values are not the same
|
|
Actual (actualFlags) : 0x1
|
|
Expected (expectedFlags): 0x5" result="fail"/>
|
|
</testcase>
|
|
<testcase result="pass" name="compare_boolfuncs"/>
|
|
<testcase result="pass" name="compare_to_nullptr"/>
|
|
<testcase result="pass" name="compare_pointerfuncs"/>
|
|
<testcase result="fail" name="compare_tostring">
|
|
<failure tag="int, string" message="Compared values are not the same
|
|
Actual (actual) : QVariant(int,123)
|
|
Expected (expected): QVariant(QString,hi)" result="fail"/>
|
|
<failure tag="null hash, invalid" message="Compared values are not the same
|
|
Actual (actual) : QVariant(QVariantHash)
|
|
Expected (expected): QVariant()" result="fail"/>
|
|
<failure tag="string, null user type" message="Compared values are not the same
|
|
Actual (actual) : QVariant(QString,A simple string)
|
|
Expected (expected): QVariant(PhonyClass)" result="fail"/>
|
|
<failure tag="both non-null user type" message="Compared values are not the same
|
|
Actual (actual) : QVariant(PhonyClass,<value not representable as string>)
|
|
Expected (expected): QVariant(PhonyClass,<value not representable as string>)" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQStringLists">
|
|
<failure tag="last item different" message="Compared lists differ at index 2.
|
|
Actual (opA): "string3"
|
|
Expected (opB): "DIFFERS"" result="fail"/>
|
|
<failure tag="second-last item different" message="Compared lists differ at index 2.
|
|
Actual (opA): "string3"
|
|
Expected (opB): "DIFFERS"" result="fail"/>
|
|
<failure tag="prefix" message="Compared lists have different sizes.
|
|
Actual (opA) size: 2
|
|
Expected (opB) size: 1" result="fail"/>
|
|
<failure tag="short list second" message="Compared lists have different sizes.
|
|
Actual (opA) size: 12
|
|
Expected (opB) size: 1" result="fail"/>
|
|
<failure tag="short list first" message="Compared lists have different sizes.
|
|
Actual (opA) size: 1
|
|
Expected (opB) size: 12" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQListInt">
|
|
<failure tag="size mismatch" message="Compared lists have different sizes.
|
|
Actual (actual) size: 2
|
|
Expected (expected) size: 3" result="fail"/>
|
|
<failure tag="value mismatch" message="Compared lists differ at index 2.
|
|
Actual (actual): 4
|
|
Expected (expected): 3" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQListIntToArray">
|
|
<failure tag="size mismatch" message="Compared lists have different sizes.
|
|
Actual (actual) size: 2
|
|
Expected (expected) size: 3" result="fail"/>
|
|
<failure tag="value mismatch" message="Compared lists differ at index 2.
|
|
Actual (actual): 4
|
|
Expected (expected): 3" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQListIntToInitializerList">
|
|
<failure tag="size mismatch" message="Compared lists have different sizes.
|
|
Actual (actual) size: 2
|
|
Expected (ARG({1, 2, 3})) size: 3" result="fail"/>
|
|
<failure tag="value mismatch" message="Compared lists differ at index 2.
|
|
Actual (actual): 4
|
|
Expected (ARG({1, 2, 3})): 3" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQListDouble">
|
|
<failure message="Compared lists differ at index 0.
|
|
Actual (double1): 1.5
|
|
Expected (double2): 1" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQColor">
|
|
<failure tag="Qt::yellow vs Qt::green" message="Compared values are not the same
|
|
Actual (colorA): #ffffff00
|
|
Expected (colorB): #ff00ff00" result="fail"/>
|
|
<failure tag="0x88ff0000 vs 0xffff0000" message="Compared values are not the same
|
|
Actual (colorA): #88ff0000
|
|
Expected (colorB): #ffff0000" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQPixmaps">
|
|
<failure tag="one null" message="Compared QPixmaps differ.
|
|
Actual (opA).isNull(): 1
|
|
Expected (opB).isNull(): 0" result="fail"/>
|
|
<failure tag="other null" message="Compared QPixmaps differ.
|
|
Actual (opA).isNull(): 0
|
|
Expected (opB).isNull(): 1" result="fail"/>
|
|
<failure tag="different size" message="Compared QPixmaps differ in size.
|
|
Actual (opA): 11x20
|
|
Expected (opB): 20x20" result="fail"/>
|
|
<failure tag="different pixels" message="Compared values are not the same" result="fail"/>
|
|
<failure tag="different dpr" message="Compared QPixmaps differ in device pixel ratio.
|
|
Actual (opA): 1
|
|
Expected (opB): 2" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQImages">
|
|
<failure tag="one null" message="Compared QImages differ.
|
|
Actual (opA).isNull(): 1
|
|
Expected (opB).isNull(): 0" result="fail"/>
|
|
<failure tag="other null" message="Compared QImages differ.
|
|
Actual (opA).isNull(): 0
|
|
Expected (opB).isNull(): 1" result="fail"/>
|
|
<failure tag="different size" message="Compared QImages differ in size.
|
|
Actual (opA): 11x20
|
|
Expected (opB): 20x20" result="fail"/>
|
|
<failure tag="different format" message="Compared QImages differ in format.
|
|
Actual (opA): 6
|
|
Expected (opB): 3" result="fail"/>
|
|
<failure tag="different pixels" message="Compared values are not the same" result="fail"/>
|
|
<failure tag="different dpr" message="Compared QImages differ in device pixel ratio.
|
|
Actual (opA): 1
|
|
Expected (opB): 2" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQRegion">
|
|
<failure tag="1-empty" message="Compared values are not the same
|
|
Actual (rA): QRegion(200x50+10+10)
|
|
Expected (rB): QRegion(null)" result="fail"/>
|
|
<failure tag="different lists" message="Compared values are not the same
|
|
Actual (rA): QRegion(200x50+10+10)
|
|
Expected (rB): QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQVector2D">
|
|
<failure message="Compared values are not the same
|
|
Actual (v2a): QVector2D(1, 2)
|
|
Expected (v2b): QVector2D(1, 3)" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQVector3D">
|
|
<failure message="Compared values are not the same
|
|
Actual (v3a): QVector3D(1, 2, 3)
|
|
Expected (v3b): QVector3D(1, 3, 3)" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="compareQVector4D">
|
|
<failure message="Compared values are not the same
|
|
Actual (v4a): QVector4D(1, 2, 3, 4)
|
|
Expected (v4b): QVector4D(1, 3, 3, 4)" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="verify">
|
|
<failure message="'opaqueFunc() < 2' returned FALSE. ()" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="verify2">
|
|
<failure message="'opaqueFunc() < 2' returned FALSE. (42)" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="tryVerify">
|
|
<failure message="'opaqueFunc() < 2' returned FALSE. ()" result="fail"/>
|
|
</testcase>
|
|
<testcase result="fail" name="tryVerify2">
|
|
<failure message="'opaqueFunc() < 2' returned FALSE. (42)" result="fail"/>
|
|
</testcase>
|
|
<testcase result="pass" name="verifyExplicitOperatorBool"/>
|
|
<testcase result="pass" name="cleanupTestCase"/>
|
|
<system-err/>
|
|
</testsuite>
|