It seems like OpenCV has a test framework based on GTest. They use it for their own unit tests, but I can not find documentation, examples or tutorials on how to use it outside
After some research and tests, I answered my own question in my blog : Using OpenCV's test framework (with CMake)
Again, I'm no CMake expert, so comments are welcome!