diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-06-25 00:42:42 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-06-24 16:57:05 +0200 |
commit | d1b0bb5607718185c048eb9a2f9eda19ab628f8c (patch) | |
tree | 75bc67829e3cdbd2f0c68b332c4e7eae51a1ae30 /tests/auto/declarative/examples | |
parent | 2a18f33552d20b637989e876175c6bd03c69bc97 (diff) |
Improve failure message of tst_examples::namingConvention
If this test fails, make sure the failure message contains the reason
for the failure.
Change-Id: Id9135a6bd0fc2cc50d604de545f4395ef6ef2294
Reviewed-on: http://codereview.qt.nokia.com/728
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'tests/auto/declarative/examples')
-rw-r--r-- | tests/auto/declarative/examples/tst_examples.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index c3e13bddd1..42e0b5b8ba 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -126,7 +126,10 @@ void tst_examples::namingConvention(const QDir &d) namingConvention(sub); } } else if(!seenLowercase) { - QTest::qFail(QString("Directory " + d.absolutePath() + " violates naming convention").toLatin1().constData(), __FILE__, __LINE__); + QFAIL(qPrintable(QString( + "Directory %1 violates naming convention; expected at least one qml file " + "starting with lower case, got: %2" + ).arg(d.absolutePath()).arg(files.join(",")))); } } |