It is good to be able to test your code quickly and repeatedly. Doesn't matter how. The important thing is to just do it. You write a piece of code, you write the tests and you keep fixing the code until it passes the tests. Easy as cake.
JUnit is great for this. I run it from Eclipse. After adding a test suite with all the tests I've written so far I can click one button and they all run, showing me a nice (green) progress bar. There aren't many tests yet, but I try to always create tests for the things that are difficult to test by looking at them in the game. Stuff like loading/saving player profiles, checking the version online etc.
I also tried to add the JUnit tests to my Ant build.xml file, so that they would be run before every build. Unfortunately there's something wrong with the way Ant links to the optional tasks. After an hour I gave up, it's just not worth the effort right now. This really should get fixed in the next version of Ant.
www.gamesfromwithin.com/ar…
www.junit.org/
www.boost.org/libs/test/do…
JUnit is great for this. I run it from Eclipse. After adding a test suite with all the tests I've written so far I can click one button and they all run, showing me a nice (green) progress bar. There aren't many tests yet, but I try to always create tests for the things that are difficult to test by looking at them in the game. Stuff like loading/saving player profiles, checking the version online etc.I also tried to add the JUnit tests to my Ant build.xml file, so that they would be run before every build. Unfortunately there's something wrong with the way Ant links to the optional tasks. After an hour I gave up, it's just not worth the effort right now. This really should get fixed in the next version of Ant.
www.gamesfromwithin.com/ar…
www.junit.org/
www.boost.org/libs/test/do…