[SDL] unit tests for SDL?
René Dudfield
renesd at gmail.com
Mon Apr 21 17:24:58 PDT 2008
Hello,
It would be great if SDL had some unit tests.
This would make porting a lot easier, and also make testing before
releases easier.
It would also help with the SDL 1.2 to SDL 1.3/2 transition.
If you set up a compile+testing farm, then it is easy for people to
test their changes on all platforms (that are set up in the compile
farm). You just commit your change, and wait for the compile farm to
do the tests on the other platforms.
A compile farm, can also show you warning messages from different
compilers, on different platforms you don't have.
It would also make testing different drivers quicker. eg testing the
different video drivers on windows/linux.
Unit tests are also good for documentation. People can look at the
tests and see how things work.
With the compile+test farm you can make automatic builds available
that have been tested.
To begin the process, it would be good to set up a testing framework,
and then begin adding tests for new features and bug fixes.
These are some of the benefits that the pygame project has been
getting with its compile farm combined with the unittests. It's made
our lives a lot easier - and saved us a lot of work.
Here's the current pygame testing, and compile farm:
http://thorbrian.com/pygame/builds.php
It makes installers for windows, and mac every few hours... which is
another nice thing about it. People can keep up with svn more easily
- without needing to compile the library themselves. We're going to
improve it to compile+test on other platforms in the near future.
What are peoples thoughts about this?
Is this something SDL would like?
Which unittest framework to use?
Would SDL accept patches to add unittests?
The pygame project is thinking perhaps we could share our compile+test
farm with SDL... but making it also compile+test SDL - as well as
pygame.
cu,
More information about the SDL
mailing list