|
From: Guilherme S. <gui...@gm...> - 2007-09-11 20:31:54
|
Any option for me is good! Option a) has the advantage that the test unit is =B3automatic=B2. What I want to say is that is easy to add or remove tests just by adding/removing a fil= e to the folder. That looks great for me. Pedro, do you want to be responsible for that, if the others don=B9t mind? Guilherme Santos On 9/11/07 9:17 PM, "Ricardo Sabino" <rik...@gm...> wrote: > On 9/11/07, Pedro Angelo <pa...@dc...> wrote: >> On Mon, 10 Sep 2007 23:49:09 +0100 >> Guilherme Santos <gui...@gm...> wrote: >>=20 >>> > Speaking on tests. >>> > I'm using CppUnit to keep my tests organized (I have only one at this >>> > moment). Another advantage is that is easy to add or remove tests and >>> > keep everything running. >>> > >>> > But this approach has several disadvantages too. >>> > It's implemented in C++ and if we think in (possible) future >>> > platforms such as mobile, it could be more complicated to get the >>> > framework compiling for that platforms. >>> > >>> > Anyway, it's easy to copy the tests code and use it to build a >>> > simpler test unit. >>> > >>> > What are you planning to test the freekode? >>> > If you guys think it's better to build another approach, it's easy >>> > for me to copy the code I have done. >>> > >>> > For the moment, I'll continue to use the cppunit to test my stuff :) >>> > >>> > >>> > Cheers, >>> > Guilherme Santos >>=20 >> Hi Guilherme, >>=20 >> I've also been thinking about this, and to make the code as portable as >> possible we probably should create our own mini test suite in ANSI C >> and expand it as need arises. >>=20 >> I've had some experience testing C code with Check and although it's >> cleverly designed to avoid C's pitfalls in regards to testing code, it >> falls a bit short on portability for more exotic platforms because it >> relies on certain UNIX functions like fork() and vsnprintf(). A few >> years back I tried porting it to a DEC Alpha workstation only to >> realize that not all UNIX environments have vsnprintf()... >>=20 >> Since openKode targets embedded platforms I'm expecting that we can't >> count on much more than a working ANSI C compiler. >>=20 >> So anyway, back to the idea of a minimalistic test framework what do you >> guys prefer: >>=20 >> a) Each test is an executable in a special "test dir" and a test runner >> app runs each test it finds via system() and reports the output. >>=20 >> b) Each test is a function (usually a macro) and the test runner just >> calls the functions iteratively (this usually requires a fork() to >> avoid a bad test crashing the test runner) >>=20 >> I'm currently leaning towards option a) but I can use whatever >> alternative you feel more comfortable with. >>=20 >> Cheers, >> p. >>=20 >> ------------------------------------------------------------------------= - >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> <http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/> >> _______________________________________________ >> Freekode-public mailing list >> Fre...@li... >> https://lists.sourceforge.net/lists/listinfo/freekode-public >=20 > I also agree that tests should be made ANSI C compatible to make sure the= y run > in most (if not all) platforms. > I'd also go for option a). >=20 > Regards, > Ricardo. >=20 >=20 > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >=20 > _______________________________________________ > Freekode-public mailing list > Fre...@li... > https://lists.sourceforge.net/lists/listinfo/freekode-public |