Unit test functions in headers

Added conditional compilation of unit test function declarations