Commit 2555c211 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

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: default avatarDavid Schulz <david.schulz@digia.com>
parent 72ab7194
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment