diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/material/data/tst_material.qml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/material/data/tst_material.qml b/tests/auto/material/data/tst_material.qml index 6cd704eb..2636bec0 100644 --- a/tests/auto/material/data/tst_material.qml +++ b/tests/auto/material/data/tst_material.qml @@ -371,4 +371,45 @@ TestCase { control.destroy() } + + function test_font_data() { + return [ + {tag: "Button:pixelSize", type: "Button", attribute: "pixelSize", value: 14}, + {tag: "Button:weight", type: "Button", attribute: "weight", value: Font.Medium}, + {tag: "Button:capitalization", type: "Button", attribute: "capitalization", value: Font.AllUppercase}, + + {tag: "TabButton:pixelSize", type: "TabButton", attribute: "pixelSize", value: 14}, + {tag: "TabButton:weight", type: "TabButton", attribute: "weight", value: Font.Medium}, + {tag: "TabButton:capitalization", type: "TabButton", attribute: "capitalization", value: Font.AllUppercase}, + + {tag: "ToolButton:pixelSize", type: "ToolButton", attribute: "pixelSize", value: 14}, + {tag: "ToolButton:weight", type: "ToolButton", attribute: "weight", value: Font.Normal}, + {tag: "ToolButton:capitalization", type: "ToolButton", attribute: "capitalization", value: Font.AllUppercase}, + + {tag: "ItemDelegate:pixelSize", type: "ItemDelegate", attribute: "pixelSize", value: 14}, + {tag: "ItemDelegate:weight", type: "ItemDelegate", attribute: "weight", value: Font.Medium}, + {tag: "ItemDelegate:capitalization", type: "ItemDelegate", attribute: "capitalization", value: Font.MixedCase}, + + {tag: "CheckBox:pixelSize", type: "CheckBox", attribute: "pixelSize", value: 16}, + {tag: "CheckBox:weight", type: "CheckBox", attribute: "weight", value: Font.Normal}, + {tag: "CheckBox:capitalization", type: "CheckBox", attribute: "capitalization", value: Font.MixedCase}, + + {tag: "RadioButton:pixelSize", type: "RadioButton", attribute: "pixelSize", value: 16}, + {tag: "RadioButton:weight", type: "RadioButton", attribute: "weight", value: Font.Normal}, + {tag: "RadioButton:capitalization", type: "RadioButton", attribute: "capitalization", value: Font.MixedCase}, + + {tag: "MenuItem:pixelSize", type: "MenuItem", attribute: "pixelSize", value: 16}, + {tag: "MenuItem:weight", type: "MenuItem", attribute: "weight", value: Font.Normal}, + {tag: "MenuItem:capitalization", type: "MenuItem", attribute: "capitalization", value: Font.MixedCase} + ] + } + + 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() + } } |