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

Check the argument's type in tst_Semantic::function_declaration_2.

parent 3050034c
No related branches found
No related tags found
No related merge requests found
...@@ -127,6 +127,13 @@ void tst_Semantic::function_declaration_2() ...@@ -127,6 +127,13 @@ void tst_Semantic::function_declaration_2()
FullySpecifiedType argTy = arg->type(); FullySpecifiedType argTy = arg->type();
QVERIFY(argTy->isReferenceType()); QVERIFY(argTy->isReferenceType());
QVERIFY(argTy->asReferenceType()->elementType().isConst()); QVERIFY(argTy->asReferenceType()->elementType().isConst());
NamedType *namedTy = argTy->asReferenceType()->elementType()->asNamedType();
QVERIFY(namedTy);
QVERIFY(namedTy->name());
Identifier *namedTypeId = namedTy->name()->asNameId()->identifier();
QVERIFY(namedTypeId);
QCOMPARE(QByteArray(namedTypeId->chars(), namedTypeId->size()),
QByteArray("QString"));
QVERIFY(decl->name()->isNameId()); QVERIFY(decl->name()->isNameId());
Identifier *funId = decl->name()->asNameId()->identifier(); Identifier *funId = decl->name()->asNameId()->identifier();
......
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