News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Continuos Integration & Unit Testing

Started by peatar, January 28, 2012, 03:02:07 PM

Previous topic - Next topic

peatar

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.

renega_666

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.

killerbot

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

peatar

> 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?

oBFusCATed

#4
Quote from: peatar on January 28, 2012, 03:02:07 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.

Quote from: peatar on January 28, 2012, 03:02:07 PM
* 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.

Quote from: peatar on January 28, 2012, 05:12:42 PM
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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

renega_666

Quotehmmh cannot find such in 10.05

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