add test for macro that adds an index