Unit testing macro code using JUnit
Moderators: dorpond, trevor, Azhrei
- jfrazierjr
- Deity
- Posts: 5176
- Joined: Tue Sep 11, 2007 7:31 pm
Unit testing macro code using JUnit
So, in discussions about targeting, macro performance came up. Craig noted that he has a few ideas that would speed up the macro performance, but the changes would likely require a fair bit of code changes to support. Part of that would then require him or someone else to extensively test the macro functions to make sure nothing is broken. At this point, I started playing around to see if I could get any JUnit tests to work around macro parsing. I quickly found out that much of the Maptools set up code is not geared toward doing any unit tests. I was wondering if this can be discussed for changing in 1.4 since it is expected to have a fairly large GUI rewrite anyway.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.
Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..
Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..
Re: Unit testing macro code using JUnit
Great point.
I think it would be most excellent to dictate that all code checked in must have unit tests to go with it. I'm not so picky as to withhold waivers for some types of code (network handling routines, for example). But as you might guess I'm a big fan of programming-by-contract and starting out by writing unit tests is a big step in that direction, I think.
But that's just me and I'm not the one who's going to be writing all of the new 1.4 code!
I think it would be most excellent to dictate that all code checked in must have unit tests to go with it. I'm not so picky as to withhold waivers for some types of code (network handling routines, for example). But as you might guess I'm a big fan of programming-by-contract and starting out by writing unit tests is a big step in that direction, I think.
But that's just me and I'm not the one who's going to be writing all of the new 1.4 code!