No, there aren't any Unit Tests. Yes, this is terrible. I'm sure a proper set up of Unit Tests would be enthusiastically accepted by the developers. Current refactorings work on "edit and pray" principle. Note we have not move to C++11 yet, if that is a problem. There's trouble supporting builds on old mac (ex. Power PCs) if we go that route.
If you're wondering how we got this way, here is a quote of Henzell, the original creator of Crawl:
You see, I gave up on Borland's [C++] manual (which is very good, I'm just lazy)
when it started talking about pointers, because I just didn't (and still don't
really) understand what they're supposed to be so useful for. After pointers
came structs, enums, pragmas, classes, macros, and a whole lot of other stuff
which still means nothing to me. It also took me several months to realise
that putting every single function into one huge module was not going to work
if I wanted my game to have more that 64K of code, and even then I did weird
things like putting heaps of code into .h files and including them
directly... you can still see the legacy of this in the code. I even had the
dungeon generator in a separate file which was spawned, created the level,
saved it to disk, then passed control back to the main program which then read
the level from disk again. new_game still works on a similar principle.
origin of the quoteThe source is a bit better now (enums are used where they make sense, for example) but there are still very few classes in the system, and the few classes which do exist tend to be bloated monsters. Also most of the important function have between 6-9 arguments. etc.
On IRC my nick is reaverb. I play online under the name reaver, though.