We *really* need a development model change !

Andriy Palamarchuk apa3a at yahoo.com
Fri Dec 28 09:21:55 CST 2001


Simplicity is one of the goals of the testing
framework, but besides being simple the framework
should be powerful enough for such big project.

I'm looking for existing library which would suit our
needs.

Unit test framework "Check" looks promising. It
provides many  features which I'd love to use for our
tests, including:
- protection of the test address space - tests crashed
do not put down the whole test suite and are reported.
At the same time you can request to run tests in the
same address space what is good for debugging.
- grouping tests in suites, tree-like grouping of the
test suites. You can choose to run only subset of the
tests
- having "set up" and "tear down" sections which can
be used to set up tests and free resourses after.
- a few forms of output - from silent to detailed

Individual test looks like (section from manual):

START_TEST(test_create)
{
   fail_unless (money_amount(five_dollars) == 5,
	       "Amount not set correctly on creation");
   fail_unless
(strcmp(money_currency(five_dollars),"USD") == 0,
	       "Currency not set correctly on creation");
}
END_TEST

They also give information how to configure the tests
with autoconf.

The issues which need to be resolved:
1) License - GPL. Is it Ok to have the test suite
under GPL?
2) Environment - POSIX. The library uses POSIX calls
to manage processes, in particular functions fork,
_exit, write, read, close, getppid, getpid, pipe.
Calls "fork" , "_exit" and "getppid" are used only
when test runs in FORK mode. We don't need to have
address space protection under Windows - tests there
should not crash.
The rest of functions are used for communication
between the test launcher and tests and can be
implemented with using corresponding Win32 calls.
After implementing these changes the framework can be
used in pure Win32 environment, without Cygwin.

Let me know if you are interested. I'll start to work
on the port. Meantime we can start to use the
framework under Wine and on Windows with Cygwin.

More information about Check you can find here:
http://check.sourceforge.net/ - home page
http://sourceforge.net/project/showfiles.php?group_id=28255
 - tutorial

Thanks,
Andriy Palamarchuk

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com




More information about the wine-devel mailing list