Skip to main content
gamedev.net
🔒 Locked

Unit Testing advice

Started by gimp Apr 19, 2004 at 10:13 PM 1 replies 650+ views
Original Post
gimp
gimp
What would be a decent unit testing framework for a game. Right now I have an extremely basic system: bool StringUtilities::UnitTest(void) Then check the return code. If you get false you have to debug the unit test to determin where the failure is. I could improve this with std::runtime_exception as it passes a string containing the name of the failed test. The UnitTest is basically a seperate exe that calls every class in my library assuming a UnitTest exists on each class(all of which are manually entered) Anything else I''m missing? I''m not interested in a perl based system BTW. How can this be made better?
Chris Brodie
Arild Fines
Arild Fines
Did you check out CppUnit? You might also wanna read Kent Beck''s book "Test Driven Development - By Example", in which he actually develops a testing framework.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Cygon
Cygon
For a more C++-like unit testing framework, also check out Unit++. There''s also TUT (templated unit test), which drastically reduces the time taken to write new unit tests.

-Markus-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.