Next: About this document
Up: Principles
Previous: Integrate documentation.
- Each component should contain a callable operation causing it
to check its own invariants (whenever they are computable).
- Screening functions evaluating preconditions should be made
part of the interface. For example, an empty function to
check if a Stack may be popped.
- Use run-time assertions
- Other tests should be available as part of a module containing
the component.
- These operations should be explicitly tied to specifications
and documentation, and vice-versa.
- Writing integrated tests is one way to understand and capture
previously implicit specifications.
- Self-tests increase consumer confidence in components.
Doug Lea
Sat Apr 8 09:58:22 EDT 1995