testlib; make macros single statements and arrange them like functions