From 933e3f08d2a3b1fc4fbda8fea179d1e30789306e Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 11 Mar 2016 13:52:28 +0100 Subject: Test Universal fonts Change-Id: I0daf4eb22d879e0b3e52ff16c9dd7b30a617001f Task-number: QTBUG-50984 Task-number: QTBUG-51696 Reviewed-by: Liang Qi --- tests/auto/universal/data/tst_universal.qml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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() + } } -- cgit v1.2.3