added basic testing and added CMake support for optional test building