11

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 of OpenCV.

It would be a perfect fit for the tests I intend to implement on our OpenCV-based library, but I do not really know where to start, as I am not really an expert in CMake (which builds our library).

I would very much appreciate help on the setup of some kind of "Hello ts World", i.e. how to configure the main CMakeList.txt and the one in the test directory in order to run tests like the ones found in the modules's test subdirectoriess (e.g. core's test folder)

user981733
  • 430
  • 4
  • 9
  • please approve your answer – rafee Oct 17 '13 at 16:15
  • You're aware http://answers.opencv.org too for OpenCV-related questions aren't you? – IsaacS May 23 '14 at 01:23
  • @IsaacS: I wasn't sure what was the best fit between answers.opencv.org and SO, given the CMake part of the question. I guess it wouldn't be good practice to duplicate or move the question there right ? – user981733 May 26 '14 at 13:26
  • I can only speak from an OpenCV user's point of view; I appreciate more if all OpenCV question are gathered in one place (yours still seems to me very OCV specific). – IsaacS May 26 '14 at 14:36
  • 1
    I hadn't realized answers.opencv.org was not (apparently) related to StackExchange. I duplicated the question there: http://answers.opencv.org/question/34203/how-do-i-use-opencvs-test-framework-with-cmake/ and I'll duplicate the answer when it allows me to. – user981733 May 28 '14 at 10:11

1 Answers1

11

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!

neid
  • 315
  • 1
  • 4
  • 12
user981733
  • 430
  • 4
  • 9