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
......@@ -127,6 +127,13 @@ void tst_Semantic::function_declaration_2()
FullySpecifiedType argTy = arg->type();
QVERIFY(argTy->isReferenceType());
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());
Identifier *funId = decl->name()->asNameId()->identifier();
......
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