Some improvements in testdsmacro