Uses assert() to verify program assumptions.