diff options
author | Caroline Chao <caroline.chao@digia.com> | 2013-04-29 14:37:31 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-03 16:51:42 +0200 |
commit | f4bfc438bb3d412555c92884c45d1549e253e8e8 (patch) | |
tree | 24d2c07bd89517dd3e355571d5e5c30219540ad1 /tests/auto/controls/data/tst_tableview.qml | |
parent | 321fbffe6706bf7eb4ea881f278296740dd084ac (diff) | |
download | qtquickcontrols-f4bfc438bb3d412555c92884c45d1549e253e8e8.tar.gz |
Tests: Add autotests for TableView (rowCount & columnCount)
Change-Id: I953d0b1803a69acec04ab4ff542ab4629a4df1c4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_tableview.qml')
-rw-r--r-- | tests/auto/controls/data/tst_tableview.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml index b03d58fe..65d7c72c 100644 --- a/tests/auto/controls/data/tst_tableview.qml +++ b/tests/auto/controls/data/tst_tableview.qml @@ -180,6 +180,24 @@ TestCase { table.destroy() } + function test_columnCount() { + var component = Qt.createComponent("tableview/table_multicolumns.qml") + compare(component.status, Component.Ready) + var table = component.createObject(container); + verify(table !== null, "table created is null") + compare(table.columnCount, 3) + table.destroy() + } + + function test_rowCount() { + var component = Qt.createComponent("tableview/table_multicolumns.qml") + compare(component.status, Component.Ready) + var table = component.createObject(container); + verify(table !== null, "table created is null") + compare(table.rowCount, 3) + table.destroy() + } + // In TableView, drawn text = table.currentRowItem.children[1].children[1].itemAt(0).children[0].children[0].text function findAChild(item, name) |