forked from qt-creator/qt-creator
C++: Tests: Reset diagnostic messages
...otherwise they add up and subsequent tests checking for the error count will fail: FAIL! : tst_AST::objc_try_statement_1() Compared values are not the same Actual (diag.errorCount): 5 Expected (0): 0 Loc: [/home/nikolai/dev/creator/qtcreator-master/tests/auto/cplusplus/ast/tst_ast.cpp(1400)] ... Change-Id: I8b4356331e95dceb1e99bb26e6ebf4591d70a08c Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -94,6 +94,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void initTestCase();
|
||||
void cleanup();
|
||||
|
||||
// line/column positions
|
||||
void line_and_column_1();
|
||||
@@ -1687,6 +1688,11 @@ void tst_AST::initTestCase()
|
||||
control.setDiagnosticClient(&diag);
|
||||
}
|
||||
|
||||
void tst_AST::cleanup()
|
||||
{
|
||||
diag.errorCount = 0;
|
||||
}
|
||||
|
||||
void tst_AST::line_and_column_1()
|
||||
{
|
||||
QSharedPointer<TranslationUnit> unit(parseDeclaration("\n"
|
||||
|
||||
Reference in New Issue
Block a user