Move test functions from tests.c to own file
Prefix all test related functions with test_
Add prefix TEST_ to all test related macros
Replace test related calls in tests.c with macros