diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-12-01 10:52:17 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-12-01 10:54:34 +0000 |
commit | 41b5175f26626b272cf8c1752f0615a663ddc374 (patch) | |
tree | 54f5d59f60cefd7bbe84c9dbe7af2e48e6378f1f /tests | |
parent | eac395fed121d09e39abcb322c508aa49c467074 (diff) |
Fix test cases
This test case changed after change 2e00500b9f32f25a15563a4fd35375ead12c14a7
got merged into qtbase. With that change, colors with alpha components
will now be converted correctly to a #AARRGGBB string.
Change-Id: I8a1edc846537bf7868ba56d819d7aedae1a10fa1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests')
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlvaluetypeproviders/data/qtquickValueTypes.qml b/tests/auto/qml/qqmlvaluetypeproviders/data/qtquickValueTypes.qml index f723dc3e2e..d35ec84e23 100644 --- a/tests/auto/qml/qqmlvaluetypeproviders/data/qtquickValueTypes.qml +++ b/tests/auto/qml/qqmlvaluetypeproviders/data/qtquickValueTypes.qml @@ -112,7 +112,7 @@ QtObject { if (m != Qt.matrix4x4(4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7)) qtquickTypeSuccess = false; if (m.toString() != "QMatrix4x4(4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7)") qtquickTypeSuccess = false; c = "blue"; - if (c.toString() != Qt.rgba(0,0,1,0).toString()) qtquickTypeSuccess = false; + if (c.toString() != Qt.rgba(0,0,1,1).toString()) qtquickTypeSuccess = false; if (c.toString() != "#0000FF" && c.toString() != "#0000ff") qtquickTypeSuccess = false; // color string converter is special // no string converter for fonts. } diff --git a/tests/auto/qml/qqmlvaluetypes/data/color_compare.qml b/tests/auto/qml/qqmlvaluetypes/data/color_compare.qml index 8701dae612..141404b067 100644 --- a/tests/auto/qml/qqmlvaluetypes/data/color_compare.qml +++ b/tests/auto/qml/qqmlvaluetypes/data/color_compare.qml @@ -15,12 +15,12 @@ MyTypeObject { // compare different color.toString()s property bool colorToStringEqualsColorString: (color.toString() == colorToString) // true - property bool colorToStringEqualsDifferentAlphaString: (color.toString() == Qt.rgba(0.2, 0.88, 0.6, 0.44).toString()) // true + property bool colorToStringEqualsDifferentAlphaString: (color.toString() == Qt.rgba(0.2, 0.88, 0.6, 0.34).toString()) // true property bool colorToStringEqualsDifferentRgbaString: (color.toString() == Qt.rgba(0.3, 0.98, 0.7, 0.44).toString()) // false // compare colors to strings property bool colorEqualsColorString: (color == colorToString) // false - property bool colorEqualsDifferentAlphaString: (color == Qt.rgba(0.2, 0.88, 0.6, 0.44).toString()) // false + property bool colorEqualsDifferentAlphaString: (color == Qt.rgba(0.2, 0.88, 0.6, 0.34).toString()) // false property bool colorEqualsDifferentRgbaString: (color == Qt.rgba(0.3, 0.98, 0.7, 0.44).toString()) // false // compare colors to various value types diff --git a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp index c8107e58bf..58755927b5 100644 --- a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp +++ b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp @@ -937,7 +937,7 @@ void tst_qqmlvaluetypes::color() QQmlComponent component(&engine, testFileUrl("color_compare.qml")); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); - QString colorString("#33e199"); + QString colorString("#5733e199"); QCOMPARE(object->property("colorToString").toString(), colorString); QCOMPARE(object->property("colorEqualsIdenticalRgba").toBool(), true); QCOMPARE(object->property("colorEqualsDifferentAlpha").toBool(), false); |