RE: [Cppunit-devel] hierarchy sample bug...
Brought to you by:
blep
From: Bastiaan B. <bas...@li...> - 2001-05-07 11:28:02
|
-----Oorspronkelijk bericht----- Van: Baptiste Lepilleur [mailto:bl...@cl...] Verzonden: Monday, May 07, 2001 12:13 PM Aan: cpp...@li... Onderwerp: Re: [Cppunit-devel] hierarchy sample bug... > I've implemented the fix I suggested yesterday: TestCaller now has two extra > constructors which accept either a reference or a pointer to an existing > fixture as an extra parameter. Now GameBoardTest constructs a TestCaller > with *this as Fixture and the correct setUp(), tearDown() and testmethod are > called. > I don't see why every TestCaller needs its own Fixture instance, so if there > aren't any objections I'd like to deprecate the old constructor. > Please let me know if you see any flaws in this approach. I would let the old constructor alone, but indicates in the documentation that the new one should be used instead. Since the old constructor leads to broken behaviour, I would like to mark it deprecated in 1.5.5 and remove it eventually. This implies that at least the code in CppUnit itself will not use this constructor anymore. Could you please look into how to do this for the code merged from CppUnitW? Humm, just one thing that popup in my mind: who owns the fixture given to the test caller ? That's may be the reason why it is done that way... I guess it had something to do with the automatic test registration thing, which has been removed anyway. Because I did not have a clear picture of all use cases of TestCaller, the current implementation allows the TestCaller to own the Fixture or not: If the Fixture is passed through a reference the TestCaller won't own it. If the Fixture is passed through a pointer the TestCaller will assume ownership and destroy it in its destructor. As far as I can see we won't need the second variant. Bastiaan > > Bastiaan > > > Baptiste. > --- > Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html > Author of The Text Reformatter, a tool for fanfiction readers and writers. > Language: English, French (Well, I'm French). > > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > http://lists.sourceforge.net/lists/listinfo/cppunit-devel > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > http://lists.sourceforge.net/lists/listinfo/cppunit-devel > _______________________________________________ Cppunit-devel mailing list Cpp...@li... http://lists.sourceforge.net/lists/listinfo/cppunit-devel |