From d1b0bb5607718185c048eb9a2f9eda19ab628f8c Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Sat, 25 Jun 2011 00:42:42 +1000 Subject: [PATCH] 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 Reviewed-by: Jiang Jiang --- 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 c3e13bd..42e0b5b 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(",")))); } } -- 1.7.2.5