I love Emacs keyboard macros, used them to convert the list of defines cleverly into a list of tests, then iterated and filled in the necessary constructor arguments.