base assertion code and testing framework