fixed unit tests and added them to cmake tests