Unit tests for macros functionality