unit tests and such to enable unit tests, add cmake flag `-DWITH_TESTS=ON` unit tests can be built and run with the `check` target.