Git commit 4c3f6ad604afe6f0211214434e062cd1747a4dee by Niko Sams. Committed on 08/12/2013 at 15:38. Pushed by nsams into branch 'master'. add test i created for debugging a problem that turned out to be perfectly = ok M +23 -0 duchain/tests/duchain.cpp M +1 -0 duchain/tests/duchain.h http://commits.kde.org/kdev-php/4c3f6ad604afe6f0211214434e062cd1747a4dee diff --git a/duchain/tests/duchain.cpp b/duchain/tests/duchain.cpp index 7124f17..5d983d4 100644 --- a/duchain/tests/duchain.cpp +++ b/duchain/tests/duchain.cpp @@ -2851,4 +2851,27 @@ void TestDUChain::bug296709() QCOMPARE(decs.at(0)->uses().begin()->first(), RangeInRevision(2, 2, 2,= 4)); } = + +void TestDUChain::declareFinalMethod() +{ + // 0 1 2 3 4 5= 6 7 + // 012345678901234567890123456789012345678901234567890= 12345678901234567890123456789 + QByteArray method("parentContext()); + QCOMPARE(top->childContexts().count(), 1); + + DUContext* contextClassA =3D top->childContexts().first(); + + Declaration* dec =3D contextClassA->localDeclarations().at(0); + ClassFunctionDeclaration* funDec =3D dynamic_cast(dec); + QVERIFY(funDec); + QCOMPARE(funDec->qualifiedIdentifier(), QualifiedIdentifier("a::foo")); + QVERIFY(funDec->isFinal()); +} + #include "duchain.moc" diff --git a/duchain/tests/duchain.h b/duchain/tests/duchain.h index db276c5..12b36b0 100644 --- a/duchain/tests/duchain.h +++ b/duchain/tests/duchain.h @@ -144,6 +144,7 @@ private slots: void gotoTest(); void ternary(); void bug296709(); + void declareFinalMethod(); }; = }