summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-08-07 11:01:18 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-08-07 10:12:29 +0000
commitca14151a0cdd3bc5fa364b2816bcd3b51af4bf3d (patch)
tree654393504950c18508116a6044be7d0ef7b644ba /tests/auto/widgets/widgets
parent2bb454ee670a84661442592ede39842b0d9bdfcd (diff)
tst_qspinbox: include actual emission count in failure message
It's useful to know how many times the signal was emitted, because it gives us insight into why the test may have failed, especially when it's difficult to reproduce. Task-number: QTBUG-69492 Change-Id: I94796ed880512b060e0a724c87edde8c3b91bb7c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets')
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index 22ca608e34..5a51bab51f 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -1786,7 +1786,8 @@ void tst_QSpinBox::stepModifierPressAndHold()
QStyle::CC_SpinBox, &spinBoxStyleOption, subControl, &spin);
QTest::mousePress(&spin, Qt::LeftButton, modifiers, buttonRect.center());
- QTRY_VERIFY(spy.length() >= 3);
+ QTRY_VERIFY2(spy.length() >= 3, qPrintable(QString::fromLatin1(
+ "Expected valueChanged() to be emitted 3 or more times, but it was only emitted %1 times").arg(spy.length())));
QTest::mouseRelease(&spin, Qt::LeftButton, modifiers, buttonRect.center());
const auto value = spy.last().at(0);