Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: peatar on January 28, 2012, 03:02:07 pm

Title: Continuos Integration & Unit Testing
Post by: peatar on January 28, 2012, 03:02:07 pm
Codeblocks is really nice! 3 questions:

 * After a bit trouble I got unit testing working. Is this the best way to do it? http://stackoverflow.com/q/9027364/194609
 * How can I do continuos integration with a codeblocks project? Or do I (really) need to create a makefile to run it on a server?
 * With NetBeans' C++ plugin it is often possible to refactor (e.g. rename variables / methods). Can this be done with codeblocks too?

Peter.
Title: Re: Continuos Integration & Unit Testing
Post by: renega_666 on January 28, 2012, 04:12:38 pm
I don't know about your two first questions but for the latest you have a code refacotring menu when right clicking on the variable/method you want to rename.
Title: Re: Continuos Integration & Unit Testing
Post by: killerbot on January 28, 2012, 04:21:41 pm
see http://wiki.codeblocks.org/index.php?title=UnitTesting

And typically :
- library providing functionality
- app using it, where unit test exe is just like any app using it
Title: Re: Continuos Integration & Unit Testing
Post by: peatar on January 28, 2012, 05:12:42 pm
> you have a code refacotring menu when right clicking on the variable/method you want to rename.

hmmh cannot find such in 10.05


> see http://wiki.codeblocks.org/index.php?title=UnitTesting

I know that but as I explained in the SO question it is suboptimal. At least when creating this library is a separate step. Or do you know how to solve this separate step?
Title: Re: Continuos Integration & Unit Testing
Post by: oBFusCATed on January 28, 2012, 07:20:30 pm
* How can I do continuos integration with a codeblocks project? Or do I (really) need to create a makefile to run it on a server?
Open a terminal and start codeblocks --help
We have some batch build capabilities, but on linux you need a X11 server running.

* With NetBeans' C++ plugin it is often possible to refactor (e.g. rename variables / methods). Can this be done with codeblocks too?
You need a nightly build for this to partly work.

I know that but as I explained in the SO question it is suboptimal. At least when creating this library is a separate step. Or do you know how to solve this separate step?
What is the optimal way in your opinion?

What I do when I do unit testing is to make a console project and put all needed files there.
Then I make the main app depend on the unit test project.
Title: Re: Continuos Integration & Unit Testing
Post by: renega_666 on January 29, 2012, 02:30:18 am
Quote
hmmh cannot find such in 10.05

 Yes I think it was introduced in a nightly...