realXtend/tundra-urho3d — pull request #3 by jonnenauha (2014-10-18 00:31:17+00:00)
Title: Unit testing with gtest

Implemented unit testing with Google C++ Testing Framework (https://code.google.com/p/googletest/)

* New `/tests` folder. Didnt want to sprinkle them all around the codebase. Here will be subfolders for different tests.
* Needed Framework modifications: I had to split `Go()` like I did in rex/tundra2. We cant go around this, the blokcing mainloop pump makes it impossible to run any synchronous tests in their own executable. New functions are `Initiailize(), Pump() and Uninitialize()`. I also made `set_run_args()` that can be used instead of `run()` to pass cmd line arguments.
* Needed CMake modifications: `/tests/CMakeLists.txt` defines macros for creating tests easily. Automatically creates the executable project, creates a test runner and `RUN_ALL_TESTS` target that runs all the runners. I decided not to clutter the codebase/build dir with CTest stuff, its a bit of overhead with gtest and i dont like the ourput and default behaviour (does not log std::out, so you see none of the progrees).
* New CMake option `-DENABLE_TESTS` that is true by default. We can make it false if you prefer that and just use it in CI. It wont run the tests but will build the executables. I exluded all the test runners from ALL_BUILD.
* Dependency build implemented for both Windows and Linux.
* Tests are now build and ran on each Travis-CI run.

Right now build is passing but tests are failing. I think the tests found a bug right away :) "QPoint" will return error from `SceneAPI::CreateAttribute()`. I saw @cadaver added the `Point` class and the type is exposed via `SceneAPI::AttributeTypes()` but as said creation is missing.

Don't know if this is a temporary thing or slipped your mind. Either way I think this is a testament to the unit tests being a useful thing :) We don't need to go overboard with it, but at least we have a working test framework now.

Let me know if you have problems.