Skip to content
Snippets Groups Projects
Commit b4a27f69 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Added test tst_AST::condition_1()

parent e6d0f2ca
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@ private slots:
void template_id();
void new_expression_1();
void new_expression_2();
void condition_1();
// statements
void if_statement();
......@@ -146,6 +147,16 @@ void tst_AST::new_expression_2()
QVERIFY(expr->new_initializer != 0);
}
void tst_AST::condition_1()
{
QSharedPointer<TranslationUnit> unit(parseExpression("\n"
"(x < 0 && y > (int) a"
));
AST *ast = unit->ast();
QVERIFY(ast != 0);
}
void tst_AST::if_statement()
{
QSharedPointer<TranslationUnit> unit(parseStatement("if (a) b;"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment