Le 1 mars 05, à 07:06, Yen-Ju Chen a écrit :
We can continue the discuss on etoile-dev maillist.
ok, here we are ;-)… I hope.
We may want to discuss the "test unit" before we put everything in CVS.
Now I just use a plain GNUstep tool for testing the Lucene port,
but it would be better to have a real one if it is possible.
It's up to you to decide…
Well I'm using UnitKit now for Étoilé I admit :-)
Nicolas has ported UnitKit 1.0 from Cocoa to GNUstep, version 1.1 was
broken and I just took the time recently to correct the broken parts,
added few features (like AppKit testing, -initForTest method like
traditional -setup method) and uploaded it in Etoile cvs
/Etoile/Frameworks/UnitKit
I added also to the cvs repository UnitTests
(/Etoile/Services/Developer/UnitTests) application written by Nicolas
to monitor tests bundle more conveniently (otherwise you would need to
use ukrun test tool within your shell); however I think the UnitTests
cvs version is broken, I'm working on an improved version which allows
to process various tests bundles in one ore more sets and to switch
between sets on the fly. The best would be an integration at some point
with ProjectCenter (and/or ide.roard.com), but that's probably another
subject.
I will post/commit a simple GNUmakefile example tomorrow explaining how
to add UnitKit support to your project.
UnitKit uses a special target "bundle" for units testing, then you need
to add such target to your GNUmakefile in order you can do :
make test=yes // when you want to compile the test bundle
ukrun bundleName.bundle // when you want to run tests
It would be nice to have a special test.make file (like library.make or
subproject.make) we could include to have automatic support for UnitKit
target.
To use UnitKit, you just need to adopt UKTest protocol for the class
you want to test, then every methods which are starting with -test[…]
will be called at runtime by ukrun tool. By default -initForTest is
called to let you setup your test object, in the case the method isn't
implemented ukrun just calls -init method to setup the object, the
situation is identical with -releaseForTest and -dealloc
More info : http://www.unitkit.org
Other minor things are the library name and the directory structure.
"Lucene" seems ok no ? May be you have a special idea or someone else ?
For the directory structure, my personal preference would be something
like :
/Lucene/GNUmakefile <-- the project makefile
/Lucene/INSTALL
/Lucene/Headers/…
/Lucene/Source/GNUmakefile <-- the subproject makefile where the objc
sources and headers are listed
/Lucene/Source/…
Quentin.
--
Quentin Mathé
[EMAIL PROTECTED]