开发者

Breakpoints in UnitTest++

开发者 https://www.devze.com 2023-02-20 06:01 出处:网络
I\'m creating some unit test with UnitTest++ in Codelite editor. However, when if i\'m debuging my unit test application the breakpoints won\'t h开发者_高级运维it. They aren\'t even shown in debugging

I'm creating some unit test with UnitTest++ in Codelite editor. However, when if i'm debuging my unit test application the breakpoints won't h开发者_高级运维it. They aren't even shown in debugging mode. Isn't it possible to debug UnitTest++ tests? Or what i'm doing wrong?

Thanks in advance!


In order to debug your unit tests using UnitTest++ in Codelite, you can use "Quick Debug" from the "Debug" menu.

set the executable to be the Test Project output. Which should have been set to an executable by the UnitTest++ plugin already.

As you already know, you need to have a main class that will call the testRunner:

main.cpp

#include <UnitTest++.h>

int main(int argc, char **argv)
{
    return UnitTest::RunAllTests();
}

The debugger should break at the first line of your main class and further breakpoints should work.

I hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消