Assert in duchain during PHP Unit-Test

David Nolden david.nolden.kdevelop at art-master.de
Tue May 12 12:22:13 UTC 2009


Am Dienstag 12 Mai 2009 13:56:58 schrieb Milian Wolff:
> David Nolden schrieb:
> > Am Montag 11 Mai 2009 22:33:48 schrieb Niko Sams:
> >> I added because of a duchain bug that did't allow more than about
> >> 5000(?) declarations
> >> in one context. Then David added support for that using MonsterBuckets
> >> or something like that.
> >> Afaik this test passed before our hackaton - so it could be related to
> >> the ref-count patches?
> >
> > I've checked the assertion, and added a comment to it. The problem: You
> > call DUChain::self()->removeDocumentChain(..), without calling
> > DUChain::self()-
> >
> >> addDocumentChain(..) first.
> >
> > Greetings, David
>
> Thanks! Now I check if the context was added and only remove it in these
> cases.
>
> Or would there be an advantage to add the context to the chain? Since
> it's for tests only I doubt I want to add it to the chain...
It needs to be added so that declaration lookup, indexed 
declarations/contexts, and all that stuff works. But for that one specific 
test, it probably doesn't matter, so you can equally as well just delete it 
in-place.

Greetings, David





More information about the KDevelop-devel mailing list