Signal an error if no tests are defined in the package.

Also clean up warning messages for test-documentation and test-code.