Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost with C code.. please help...
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-02-02 12:13:16


AMDG

On 02/02/2012 06:59 AM, Kamalkishor wrote:
> Hello,
>
> I am very new to Boost. I have to write unit test cases in order to
> increase the code coverage of a C source code.
>
> I am not getting the approach to start writing the test cases.
>
> As it is a code C code, there are huge number of functions, one
> calling the other, and a lot of global variables.
>
> Can anyone please help me out to get the approach to start writing
> Unit test cases.
>

You want to test every aspect of the
expected behavior of each function.
Dealing with global variables is a pain,
though. You should probably use a text
fixture to reset them all for each test
case.

>
> And, I have used a "c++" compiler for compiling small Boost programs.
> I am getting error while using "GCC" compiler.
> Can we use GCC compiler for compiling Boost program? How can we do this?
>

c++ is GCC. It just adds the C++ runtime libraries
to the linker and treats source files as C++.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net