forked from qt-creator/qt-creator
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:
@@ -3774,7 +3774,7 @@ void tst_TestCore::testMergeModelRewriter1_data()
|
|||||||
QString buttonOutlineExpectedQmlContents = readQmlFromFile(QString(TESTSRCDIR) + "/../data/merging/ButtonOutlineExpected.qml");
|
QString buttonOutlineExpectedQmlContents = readQmlFromFile(QString(TESTSRCDIR) + "/../data/merging/ButtonOutlineExpected.qml");
|
||||||
|
|
||||||
QTest::newRow("Simple style replacement") << simpleTemplateQmlContents << simpleStyleQmlContents << simpleExpectedQmlContents;
|
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("Empty stylesheet") << emptyTemplateQmlContents << emptyStyleQmlContents << emptyExpectedQmlContents;
|
||||||
QTest::newRow("Root node replacement") << rootReplacementTemplateQmlContents << rootReplacementStyleQmlContents << rootReplacementExpectedQmlContents;
|
QTest::newRow("Root node replacement") << rootReplacementTemplateQmlContents << rootReplacementStyleQmlContents << rootReplacementExpectedQmlContents;
|
||||||
QTest::newRow("Switch styling") << switchTemplateQmlContents << switchStyleQmlContents << switchExpectedQmlContents;
|
QTest::newRow("Switch styling") << switchTemplateQmlContents << switchStyleQmlContents << switchExpectedQmlContents;
|
||||||
@@ -3828,7 +3828,10 @@ void tst_TestCore::testMergeModelRewriter1()
|
|||||||
StylesheetMerger merger(templateView.data(), styleView.data());
|
StylesheetMerger merger(templateView.data(), styleView.data());
|
||||||
merger.merge();
|
merger.merge();
|
||||||
|
|
||||||
QCOMPARE(textEdit1.toPlainText().trimmed(), qmlExpectedString.trimmed());
|
QString trimmedActual = textEdit1.toPlainText().trimmed();
|
||||||
|
QString trimmedExpected = qmlExpectedString.trimmed();
|
||||||
|
|
||||||
|
QCOMPARE(trimmedActual, trimmedExpected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_TestCore::testCopyModelRewriter2()
|
void tst_TestCore::testCopyModelRewriter2()
|
||||||
|
@@ -30,24 +30,26 @@ Rectangle {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rectangle3
|
id: rectangle3
|
||||||
x: 140;
|
x: 140
|
||||||
y: 180;
|
y: 180
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop {
|
GradientStop {
|
||||||
position: 0
|
position: 0
|
||||||
color: "white"
|
color: "#ffffff"
|
||||||
}
|
}
|
||||||
|
|
||||||
GradientStop {
|
GradientStop {
|
||||||
position: 1
|
position: 1
|
||||||
color: "black"
|
color: "#000000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
id: rectangle4
|
id: rectangle4
|
||||||
x: 10
|
x: 10
|
||||||
y: 20
|
y: 20
|
||||||
width: 200
|
width: 100
|
||||||
height: 50
|
height: 150
|
||||||
|
source: "qt/realcool.jpg"
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rectangle5
|
id: rectangle5
|
||||||
x: 10
|
x: 10
|
||||||
@@ -55,7 +57,6 @@ Rectangle {
|
|||||||
width: 200
|
width: 200
|
||||||
height: 50
|
height: 50
|
||||||
}
|
}
|
||||||
source: "qt/realcool.jpg"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@ Item {
|
|||||||
position: 0
|
position: 0
|
||||||
color: "white"
|
color: "white"
|
||||||
}
|
}
|
||||||
|
|
||||||
GradientStop {
|
GradientStop {
|
||||||
position: 1
|
position: 1
|
||||||
color: "black"
|
color: "black"
|
||||||
@@ -29,15 +30,15 @@ Item {
|
|||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rectangle5
|
id: rectangle5
|
||||||
x: 10
|
x: 160
|
||||||
y: 20
|
y: 220
|
||||||
width: 200
|
width: 200
|
||||||
height: 50
|
height: 50
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
id: rectangle4
|
id: rectangle4
|
||||||
x: 10;
|
x: 150;
|
||||||
y: 10;
|
y: 200;
|
||||||
height: 150
|
height: 150
|
||||||
width: 100
|
width: 100
|
||||||
source: "qt/realcool.jpg"
|
source: "qt/realcool.jpg"
|
||||||
|
Reference in New Issue
Block a user