From: J-P Nurmi Date: Fri, 7 Sep 2012 12:47:47 +0000 (+0200) Subject: Remove tst_qquicktext::alignments() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=400ff21dbd0edeec2b1be202961e146f76b9fbf8;p=profile%2Fivi%2Fqtdeclarative.git Remove tst_qquicktext::alignments() These tests are not valid. Will be covered by Lancelot-based scenegraph rendering tests: https://codereview.qt-project.org/#change,34437 Change-Id: I4e5e1b7b5b141d377e4367d143ded6abbddd52a1 Reviewed-by: Sergio Ahumada Reviewed-by: Caroline Chao Reviewed-by: Yoann Lopes Reviewed-by: Paul Olav Tvete --- diff --git a/tests/auto/quick/qquicktext/data/alignments.qml b/tests/auto/quick/qquicktext/data/alignments.qml deleted file mode 100644 index 9798d9c..0000000 --- a/tests/auto/quick/qquicktext/data/alignments.qml +++ /dev/null @@ -1,41 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - id: top - width: 70; height: 70; - - property alias horizontalAlignment: t.horizontalAlignment - property alias verticalAlignment: t.verticalAlignment - property alias wrapMode: t.wrapMode - property alias running: timer.running - property string txt: "Test" - - Rectangle { - anchors.centerIn: parent - width: 40 - height: 40 - color: "green" - - Text { - id: t - - anchors.fill: parent - horizontalAlignment: Text.AlignRight - verticalAlignment: Text.AlignBottom - wrapMode: Text.WordWrap - text: top.txt - } - Timer { - id: timer - - interval: 1 - running: true - repeat: true - onTriggered: { - top.txt = top.txt + "
more " + top.txt.length; - if (top.txt.length > 50) - running = false - } - } - } -} diff --git a/tests/auto/quick/qquicktext/data/alignments_cb.png b/tests/auto/quick/qquicktext/data/alignments_cb.png deleted file mode 100644 index cf6199a..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_cb.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/data/alignments_cc.png b/tests/auto/quick/qquicktext/data/alignments_cc.png deleted file mode 100644 index f81ccb4..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_cc.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/data/alignments_ct.png b/tests/auto/quick/qquicktext/data/alignments_ct.png deleted file mode 100644 index 9ba6412..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_ct.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/data/alignments_lb.png b/tests/auto/quick/qquicktext/data/alignments_lb.png deleted file mode 100644 index 1b50a81..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_lb.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/data/alignments_lc.png b/tests/auto/quick/qquicktext/data/alignments_lc.png deleted file mode 100644 index f041b86..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_lc.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/data/alignments_lt.png b/tests/auto/quick/qquicktext/data/alignments_lt.png deleted file mode 100644 index c75e0d1..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_lt.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/data/alignments_rb.png b/tests/auto/quick/qquicktext/data/alignments_rb.png deleted file mode 100644 index b06a5da..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_rb.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/data/alignments_rc.png b/tests/auto/quick/qquicktext/data/alignments_rc.png deleted file mode 100644 index e468857..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_rc.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/data/alignments_rt.png b/tests/auto/quick/qquicktext/data/alignments_rt.png deleted file mode 100644 index 576715f..0000000 Binary files a/tests/auto/quick/qquicktext/data/alignments_rt.png and /dev/null differ diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index deaaa13..20dd7f0 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -83,9 +83,6 @@ private slots: void implicitElide(); void textFormat(); - void alignments_data(); - void alignments(); - void baseUrl(); void embeddedImages_data(); void embeddedImages(); @@ -689,59 +686,6 @@ void tst_qquicktext::textFormat() } } - -void tst_qquicktext::alignments_data() -{ - QTest::addColumn("hAlign"); - QTest::addColumn("vAlign"); - QTest::addColumn("expectfile"); - - QTest::newRow("LT") << int(Qt::AlignLeft) << int(Qt::AlignTop) << testFile("alignments_lt.png"); - QTest::newRow("RT") << int(Qt::AlignRight) << int(Qt::AlignTop) << testFile("alignments_rt.png"); - QTest::newRow("CT") << int(Qt::AlignHCenter) << int(Qt::AlignTop) << testFile("alignments_ct.png"); - - QTest::newRow("LB") << int(Qt::AlignLeft) << int(Qt::AlignBottom) << testFile("alignments_lb.png"); - QTest::newRow("RB") << int(Qt::AlignRight) << int(Qt::AlignBottom) << testFile("alignments_rb.png"); - QTest::newRow("CB") << int(Qt::AlignHCenter) << int(Qt::AlignBottom) << testFile("alignments_cb.png"); - - QTest::newRow("LC") << int(Qt::AlignLeft) << int(Qt::AlignVCenter) << testFile("alignments_lc.png"); - QTest::newRow("RC") << int(Qt::AlignRight) << int(Qt::AlignVCenter) << testFile("alignments_rc.png"); - QTest::newRow("CC") << int(Qt::AlignHCenter) << int(Qt::AlignVCenter) << testFile("alignments_cc.png"); -} - - -void tst_qquicktext::alignments() -{ - QSKIP("Text alignment pixmap comparison tests will not work with scenegraph"); -#if (0)// No widgets in scenegraph - QFETCH(int, hAlign); - QFETCH(int, vAlign); - QFETCH(QString, expectfile); - - QQuickView *window = createView(testFile("alignments.qml")); - window->show(); - window->requestActivateWindow(); - QTest::qWait(50); - QTRY_COMPARE(QGuiApplication::activeWindow(), static_cast(window)); - - QObject *ob = window->rootObject(); - QVERIFY(ob != 0); - ob->setProperty("horizontalAlignment",hAlign); - ob->setProperty("verticalAlignment",vAlign); - QTRY_COMPARE(ob->property("running").toBool(),false); - QImage actual(window->width(), window->height(), QImage::Format_RGB32); - actual.fill(qRgb(255,255,255)); - QPainter p(&actual); - window->render(&p); - - QImage expect(expectfile); - if (QGuiApplicationPrivate::graphics_system_name == "raster" || QGuiApplicationPrivate::graphics_system_name == "") { - QCOMPARE(actual,expect); - } - delete window; -#endif -} - //the alignment tests may be trivial o.oa void tst_qquicktext::horizontalAlignment() {