move assertions to macro form
simplify negative test cases