aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-11 13:52:28 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-11 15:29:17 +0000
commit933e3f08d2a3b1fc4fbda8fea179d1e30789306e (patch)
tree1e13e90f0f874d7fe9c0d829e771b81a9538190d
parent2adaf05d4a2afad43bf511882ecc974ca071b72f (diff)
Test Universal fonts
Change-Id: I0daf4eb22d879e0b3e52ff16c9dd7b30a617001f Task-number: QTBUG-50984 Task-number: QTBUG-51696 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
-rw-r--r--tests/auto/universal/data/tst_universal.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/universal/data/tst_universal.qml b/tests/auto/universal/data/tst_universal.qml
index 36e8b0b2..c232e7c1 100644
--- a/tests/auto/universal/data/tst_universal.qml
+++ b/tests/auto/universal/data/tst_universal.qml
@@ -331,4 +331,25 @@ TestCase {
control.destroy()
}
+
+ function test_font_data() {
+ return [
+ {tag: "Control:pixelSize", type: "Control", attribute: "pixelSize", value: 15},
+
+ {tag: "GroupBox:pixelSize", type: "GroupBox", attribute: "pixelSize", value: 15},
+ {tag: "GroupBox:weight", type: "GroupBox", attribute: "weight", value: Font.DemiBold},
+
+ {tag: "TabButton:pixelSize", type: "TabButton", attribute: "pixelSize", value: 24},
+ {tag: "TabButton:weight", type: "TabButton", attribute: "weight", value: Font.Light},
+ ]
+ }
+
+ function test_font(data) {
+ var control = Qt.createQmlObject("import Qt.labs.controls 1.0; " + data.type + " { }", testCase)
+ verify(control)
+
+ compare(control.font[data.attribute], data.value)
+
+ control.destroy()
+ }
}