How to run UnitTest++ project in CL?

General questions regarding the usage of CodeLite
sturm
CodeLite Curious
Posts: 5
Joined: Fri Nov 27, 2015 6:45 am
Genuine User: Yes
IDE Question: C++
Contact:

How to run UnitTest++ project in CL?

Post 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?
User avatar
Jarod42
CodeLite Expert
Posts: 237
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

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

Post 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.
sturm
CodeLite Curious
Posts: 5
Joined: Fri Nov 27, 2015 6:45 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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".
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif »

Seems to be working just fine here...
Can you create a minimal workspace example that reproduces the problem?

Eran
Make sure you have read the HOW TO POST thread
sturm
CodeLite Curious
Posts: 5
Joined: Fri Nov 27, 2015 6:45 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by sturm »

I've attached the zip file of my workspace, please have a look.
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif »

FYI: I have updated the wiki docs to fit the latest changes
http://codelite.org/LiteEditor/UnitTestPP
Eran
Make sure you have read the HOW TO POST thread
sturm
CodeLite Curious
Posts: 5
Joined: Fri Nov 27, 2015 6:45 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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]
sturm
CodeLite Curious
Posts: 5
Joined: Fri Nov 27, 2015 6:45 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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.
You do not have the required permissions to view the files attached to this post.
Post Reply