diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-04 13:23:23 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-05 06:15:00 +0200 |
commit | 253497b7446c7d723aa3bdd7152e25d6852f2604 (patch) | |
tree | e91eb9fdb94aae121fa587ab5f54f3917a6c1d55 /tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp | |
parent | 3f88da82b1bdf79fe4c89640838b0b69c8a89d8b (diff) |
Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at
run-time to be inapplicable or unsafe. If a test function can be
determined to be inapplicable at compile-time, the entire test function
should be omitted instead of replacing the body of the test function
with a QSKIP, which only serves to slow down test runs and to inflate
test run-rates with empty, inapplicable tests.
Task-number: QTQAINFRA-278
Change-Id: I582732e3dd657df834f9a98fd52d7ee368f2f29b
Reviewed-on: http://codereview.qt-project.org/5946
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp')
-rw-r--r-- | tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 6b4ad190ce..e9d9cb67bb 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -61,12 +61,16 @@ private slots: void qgraphicsgridlayout(); void addItem_data(); void addItem(); +#ifndef Q_WS_MAC void alignment_data(); void alignment(); +#endif void alignment2(); void alignment2_data(); +#ifndef Q_WS_MAC void columnAlignment_data(); void columnAlignment(); +#endif void columnCount_data(); void columnCount(); void columnMaximumWidth_data(); @@ -490,6 +494,8 @@ void tst_QGraphicsGridLayout::addItem() delete layout; } +// Resizing a QGraphicsWidget to effectiveSizeHint(Qt::MaximumSize) is currently not supported on mac. +#ifndef Q_WS_MAC void tst_QGraphicsGridLayout::alignment_data() { QTest::addColumn<bool>("hasHeightForWidth"); @@ -501,9 +507,6 @@ void tst_QGraphicsGridLayout::alignment_data() // public Qt::Alignment alignment(QGraphicsLayoutItem* item) const void tst_QGraphicsGridLayout::alignment() { -#ifdef Q_WS_MAC - QSKIP("Resizing a QGraphicsWidget to effectiveSizeHint(Qt::MaximumSize) is currently not supported on mac", SkipAll); -#endif QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); @@ -562,7 +565,10 @@ void tst_QGraphicsGridLayout::alignment() delete widget; } +#endif +// Resizing a QGraphicsWidget to effectiveSizeHint(Qt::MaximumSize) is currently not supported on mac. +#ifndef Q_WS_MAC void tst_QGraphicsGridLayout::columnAlignment_data() { QTest::addColumn<bool>("hasHeightForWidth"); @@ -575,9 +581,6 @@ void tst_QGraphicsGridLayout::columnAlignment_data() // public Qt::Alignment columnAlignment(int column) const void tst_QGraphicsGridLayout::columnAlignment() { -#ifdef Q_WS_MAC - QSKIP("Resizing a QGraphicsWidget to effectiveSizeHint(Qt::MaximumSize) is currently not supported on mac", SkipAll); -#endif QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); @@ -630,6 +633,7 @@ void tst_QGraphicsGridLayout::columnAlignment() delete widget; } +#endif void tst_QGraphicsGridLayout::columnCount_data() { |