fix typo and add test suite for invariant-assertion