Boost unit testing main function?

后端 未结 4 1949
[愿得一人]
[愿得一人] 2021-01-11 16:51

How do I define my own main() function when testing with boost?

Boost is using it\'s own main function, but I\'m using a custom memory manager and it ne

4条回答
  •  终归单人心
    2021-01-11 17:15

    You have to define

    BOOST_TEST_NO_MAIN

    before the boost includes.

    BOOST_TEST_MAIN

    is the default. http://www.boost.org/doc/libs/1_36_0/libs/test/doc/html/utf/compilation.html

提交回复
热议问题