Commit b4a27f69 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Added test tst_AST::condition_1()

parent e6d0f2ca
......@@ -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;"));
......
Supports Markdown
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