Some random notes that might be useful to developers who want to hack the code.
If this list grows unwieldy, I'll try to organize them.
- All unit tests are nested classes of the target class they're testing. This allows
them access to the target's private members, simplifying state setup and verification.
Note that the compiler probably has a kludge to permit this access (for example, by
synthesizing package-visible accessor methods) but this is transparent to the developer
and preserves encapsulation since the methods are not visible to the compiler and the
package is sealed at runtime. Test classes are filtered out of the distribution build
by looking for the word "Test" in the class name. They are filtered out of the javadocs
by marking them as deprecated; unfortunately, I couldn't find a cleaner way to do it.
- The dependencies on JDK 1.4 are pretty slim right now, so it should be easy to
backport to 1.3 (or even earlier versions). You'd have to take out the assertions,
remove or modify exception chaining, and use a different logging mechanism.
- Any other questions? Ask me.