Adjust test case data for complex test and reactivate it

Change-Id: I5e61971ff420f3193bca1f63040044833e26cca8
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
This commit is contained in:
Michael Brüning
2020-05-27 18:22:29 +02:00
parent 3a1d759b1f
commit b7155a6a04
3 changed files with 18 additions and 13 deletions

View File

@@ -3774,7 +3774,7 @@ void tst_TestCore::testMergeModelRewriter1_data()
QString buttonOutlineExpectedQmlContents = readQmlFromFile(QString(TESTSRCDIR) + "/../data/merging/ButtonOutlineExpected.qml");
QTest::newRow("Simple style replacement") << simpleTemplateQmlContents << simpleStyleQmlContents << simpleExpectedQmlContents;
//QTest::newRow("Complex style replacement") << complexTemplateQmlContents << complexStyleQmlContents << complexExpectedQmlContents;
QTest::newRow("Complex style replacement") << complexTemplateQmlContents << complexStyleQmlContents << complexExpectedQmlContents;
QTest::newRow("Empty stylesheet") << emptyTemplateQmlContents << emptyStyleQmlContents << emptyExpectedQmlContents;
QTest::newRow("Root node replacement") << rootReplacementTemplateQmlContents << rootReplacementStyleQmlContents << rootReplacementExpectedQmlContents;
QTest::newRow("Switch styling") << switchTemplateQmlContents << switchStyleQmlContents << switchExpectedQmlContents;
@@ -3828,7 +3828,10 @@ void tst_TestCore::testMergeModelRewriter1()
StylesheetMerger merger(templateView.data(), styleView.data());
merger.merge();
QCOMPARE(textEdit1.toPlainText().trimmed(), qmlExpectedString.trimmed());
QString trimmedActual = textEdit1.toPlainText().trimmed();
QString trimmedExpected = qmlExpectedString.trimmed();
QCOMPARE(trimmedActual, trimmedExpected);
}
void tst_TestCore::testCopyModelRewriter2()

View File

@@ -30,24 +30,26 @@ Rectangle {
Rectangle {
id: rectangle3
x: 140;
y: 180;
x: 140
y: 180
gradient: Gradient {
GradientStop {
position: 0
color: "white"
color: "#ffffff"
}
GradientStop {
position: 1
color: "black"
color: "#000000"
}
}
Image {
id: rectangle4
x: 10
y: 20
width: 200
height: 50
width: 100
height: 150
source: "qt/realcool.jpg"
Rectangle {
id: rectangle5
x: 10
@@ -55,7 +57,6 @@ Rectangle {
width: 200
height: 50
}
source: "qt/realcool.jpg"
}
}

View File

@@ -21,6 +21,7 @@ Item {
position: 0
color: "white"
}
GradientStop {
position: 1
color: "black"
@@ -29,15 +30,15 @@ Item {
}
Rectangle {
id: rectangle5
x: 10
y: 20
x: 160
y: 220
width: 200
height: 50
}
Image {
id: rectangle4
x: 10;
y: 10;
x: 150;
y: 200;
height: 150
width: 100
source: "qt/realcool.jpg"