How do you run your unit tests? Compiler flags? Static libraries?

后端 未结 7 511
情书的邮戳
情书的邮戳 2021-02-04 06:20

I\'m just getting started with TDD and am curious as to what approaches others take to run their tests. For reference, I am using the google testing framework, but I believe the

7条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 07:00

    For C/C++ apps I try to have as much code as possible in one or more dlls, with the main application being the bare minimum to start-up and hand-off to the dll. Dlls are much easier to test because they can export as many entry points as I like for a test application to use.

    I use a seperate test application that links to the Dll(s). I'm strongly in favour of keeping test code and "product" code in seperate modules.

提交回复
热议问题