cleanup test/CMakeLists.txt:
- add macro to reduce redundant code / for naming consisty
- fix dependencies