diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-19 13:31:25 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-19 13:31:25 (GMT) |
commit | 78dcac759d500c1744751955623b1d0babcd37a4 (patch) | |
tree | 59d7a2540c2fcffe0b274afbf85db9a1f53242f4 /tests/auto/compilerwarnings/tst_compilerwarnings.cpp | |
parent | f1c79b3c90c1e14d8bee0228e3e416fa5337cf6e (diff) | |
parent | de0858687898f6e0e54cce3f986779c7aa1a350e (diff) | |
download | Qt-78dcac759d500c1744751955623b1d0babcd37a4.zip Qt-78dcac759d500c1744751955623b1d0babcd37a4.tar.gz Qt-78dcac759d500c1744751955623b1d0babcd37a4.tar.bz2 |
Merge remote branch 'origin/4.7' into HEAD
Conflicts:
src/corelib/tools/qlocale_symbian.cpp
Diffstat (limited to 'tests/auto/compilerwarnings/tst_compilerwarnings.cpp')
-rw-r--r-- | tests/auto/compilerwarnings/tst_compilerwarnings.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp index f910a18..82c327a 100644 --- a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp +++ b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp @@ -62,6 +62,9 @@ class tst_CompilerWarnings: public QObject private slots: void warnings_data(); void warnings(); + +private: + bool shouldIgnoreWarning(QString const&); }; #if 0 @@ -242,16 +245,37 @@ void tst_CompilerWarnings::warnings() if (!errs.isEmpty()) { errList = errs.split("\n"); qDebug() << "Arguments:" << args; - foreach (QString err, errList) { - qDebug() << err; + QStringList validErrors; + foreach (QString const& err, errList) { + bool ignore = shouldIgnoreWarning(err); + qDebug() << err << (ignore ? " [ignored]" : ""); + if (!ignore) { + validErrors << err; + } } + errList = validErrors; } QCOMPARE(errList.count(), 0); // verbose info how many lines of errors in output - QVERIFY(errs.isEmpty()); tmpQSourceFile.remove(); } +bool tst_CompilerWarnings::shouldIgnoreWarning(QString const& warning) +{ + if (warning.isEmpty()) { + return true; + } + + // icecc outputs warnings if some icecc node breaks + if (warning.startsWith("ICECC[")) { + return true; + } + + // Add more bogus warnings here + + return false; +} + QTEST_APPLESS_MAIN(tst_CompilerWarnings) #include "tst_compilerwarnings.moc" |