fix macro name resolution and tidy up the test templates
small tweak