aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdrian Yanes <ext-adrian.yanes@nokia.com>2010-11-29 11:33:07 +0000
committerAdrian Yanes <ext-adrian.yanes@nokia.com>2010-11-29 14:31:05 +0000
commite3c0919184dd74cdc1b5c20ea3d7e4ac1216b7d6 (patch)
tree1e05ea1b9e8685fc681b6702105ad5575b2f86d5 /tests
parent039b2f909489151a27023498ec64b5c9f89f59a5 (diff)
Changes: adding new case for ut_mlabel (textFormat)
RevBy: Janne Heikkilä
Diffstat (limited to 'tests')
-rw-r--r--tests/ut_mlabel/ut_mlabel.cpp10
-rw-r--r--tests/ut_mlabel/ut_mlabel.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/ut_mlabel/ut_mlabel.cpp b/tests/ut_mlabel/ut_mlabel.cpp
index 38bda507..c3d3e3a8 100644
--- a/tests/ut_mlabel/ut_mlabel.cpp
+++ b/tests/ut_mlabel/ut_mlabel.cpp
@@ -939,4 +939,14 @@ void Ut_MLabel::rightBearing()
}
+void Ut_MLabel::testTextFormat()
+{
+ label->setText("Hello world!");
+ label->setTextFormat(Qt::RichText);
+ QCOMPARE(label->textFormat(), Qt::RichText);
+
+ label->setTextFormat(Qt::PlainText);
+ QCOMPARE(label->textFormat(), Qt::PlainText);
+}
+
QTEST_APPLESS_MAIN(Ut_MLabel);
diff --git a/tests/ut_mlabel/ut_mlabel.h b/tests/ut_mlabel/ut_mlabel.h
index 250d4c1c..e513da17 100644
--- a/tests/ut_mlabel/ut_mlabel.h
+++ b/tests/ut_mlabel/ut_mlabel.h
@@ -126,6 +126,8 @@ private slots:
//Regression test for bug 196025 - MLabel with text ending in 'f'
void rightBearing();
+ void testTextFormat();
+
private:
/**
* Helper method for testSizeHint().