Connecting Tech Pros Worldwide Forums | Help | Site Map

Test driven development in C ?

Yannick Tremblay
Guest
 
Posts: n/a
#1: Jan 3 '06
Hi C peoples,

I have been working with OO languages in recent years mostly
C++ and Java and I have seen the advantages of good unit testing
frameworks and/or test driven development.

I've recently changed job to a place where C is the main language
used and I am seeing a need to improve the amount of developper
automated testing of the code. I am looking ideally for good books
on test driven development to recommend to other programmers and
good C-targeted unit test frameworks. Those I know of are really
targetted to OO languages and not easy to introduce to C
programmers.

I was wondering if anybody has some good recommendations.

Thanks

Yan


Targeur fou
Guest
 
Posts: n/a
#2: Jan 3 '06

re: Test driven development in C ?



Yannick Tremblay wrote:[color=blue]
> Hi C peoples,[/color]

Hi,
[color=blue]
>
> I have been working with OO languages in recent years mostly
> C++ and Java and I have seen the advantages of good unit testing
> frameworks and/or test driven development.
>
> I've recently changed job to a place where C is the main language
> used and I am seeing a need to improve the amount of developper
> automated testing of the code. I am looking ideally for good books
> on test driven development to recommend to other programmers and
> good C-targeted unit test frameworks. Those I know of are really
> targetted to OO languages and not easy to introduce to C
> programmers.
>
> I was wondering if anybody has some good recommendations.[/color]

I have no special recommandations but I know the existence (I never
used it) of Cunit (it sounds like CppUnit or JUnit, two fraweworks that
maybe you and your colleagues know).
homepage: http://cunit.sourceforge.net/
It's covered by the GNU GPL.

I used Attol UniTest a few times, a tool that was very powerful but
actually I don't know the company which sells and distributes this
product.

Regis

goldfita@signalsguru.net
Guest
 
Posts: n/a
#3: Jan 3 '06

re: Test driven development in C ?


I was just experimenting with CUT (C Unit Test) this morning. It
parses the source, and generates a new source file with the tests in
it. You may want to check out this site -
http://opensourcetesting.org/unit_c.php. This site, too, may be
helpful - http://www.aptest.com/resources.html.

Marco
Guest
 
Posts: n/a
#4: Jan 4 '06

re: Test driven development in C ?



Yannick Tremblay wrote:[color=blue]
> I've recently changed job to a place where C is the main language
> used and I am seeing a need to improve the amount of developper
> automated testing of the code. I am looking ideally for good books
> on test driven development to recommend to other programmers and
> good C-targeted unit test frameworks. Those I know of are really
> targetted to OO languages and not easy to introduce to C
> programmers.[/color]

Since you will probably be using a C/C++ compiler for initial
development, you can use C++ to create your tests for your C code. This
would allow you to use one of C++ test frameworks. There was article
in CUJ about this a while ago using CPPtest lite.

Keep us posted on what you eventually find out and use.

Closed Thread