Page 1 of 1

How to run UnitTest++ project in CL?

Posted: Fri Nov 27, 2015 7:00 am
by sturm
I don't know how to run a UnitTest++ project to make the colorful results show in the pane of the plugin. when I run my UnitTest++ project, CL pops up a window and says "Project contains 0 tests, nothing to be done." But when I run it manually in MSYS2 terminal, I got:
$ ./DummyClass-Test.exe
Success: 2 tests passed.
Test time: 0.00 seconds.

which tells me my project is working.
PS: I checked the tutorial on "http://codelite.org/LiteEditor/UnitTestPP", my project is not exactly the same but only difference that might matters is I cannot find the button called "run project as unit test project", so I just ran it as normal project (but I think CL knows what to do from the project type), or choosing "Run Project as UnitTest++ and Report" from the plugin menu, either way it ends up with the same problem.
Could someone please help me?

Re: How to run UnitTest++ project in CL?

Posted: Fri Nov 27, 2015 1:07 pm
by Jarod42
The project has to be of kind unitTest++.
It can be done at creation of project
or with plugins/UnitTest++/ "Mark this project as unitTest++ project".
then "Run project as unitTest++ and report" is available.

Re: How to run UnitTest++ project in CL?

Posted: Mon Nov 30, 2015 5:42 am
by sturm
Thanks a lot for the reply.

I'm pretty sure my project is of kind UnitTest++, since during project creation a template has to be selected and I chose UnitTest++. Also I tried in the plug-ins menu "Mark this project as UnitTest++ project". Still when I run it I was told "Proejct contains 0 tests. Nothing to be done".

Re: How to run UnitTest++ project in CL?

Posted: Mon Nov 30, 2015 9:32 am
by eranif
Seems to be working just fine here...
Can you create a minimal workspace example that reproduces the problem?

Eran

Re: How to run UnitTest++ project in CL?

Posted: Mon Nov 30, 2015 9:50 am
by sturm
I've attached the zip file of my workspace, please have a look.

Re: How to run UnitTest++ project in CL?

Posted: Tue Dec 01, 2015 10:52 am
by eranif
I tested this locally and it seems to work fine (after I modified the project settings to find my installation of unittest-cpp)

One comment:

You can right click on the the project "DummyClass-Test" and select "Build Order"
In the dialog, check the other project - so when next time you build the "DummyClass-Test" project it will also built the other project

It might be working for me as I am using latest CodeLite with some modifications to the UT plugin.
I have uploaded you a build that works for me, you can download it from here: http://codelite.org/downloads/codelite/ ... -9.0.6.exe (its a 64 bit version, hope you got a 64 bit windows...)

ut.png
Eran

Re: How to run UnitTest++ project in CL?

Posted: Tue Dec 01, 2015 9:26 pm
by eranif
FYI: I have updated the wiki docs to fit the latest changes
http://codelite.org/LiteEditor/UnitTestPP
Eran

Re: How to run UnitTest++ project in CL?

Posted: Fri Dec 04, 2015 7:23 am
by sturm
I've checked the build order option and also tried out 9.0.6 version, it still doesn't work. If CL didn't think this was a UT project, the menu item "Plugins=>UnitTest++=>Run project as UnitTest++ and report" should be gray and unavailable. And this is not the case here.

[img]C:\Workspace\Downloads\Untitled.png[/img]

Re: How to run UnitTest++ project in CL?

Posted: Fri Dec 04, 2015 7:27 am
by sturm
I tried to show your the screenshot but seems like I don't know how to post pictures here. I'm trying again using attachment.