Questions tagged [cunit]

Anything related to CUnit, a unit testing framework for C programs.

Anything related to CUnit, a unit testing framework for C programs.

80 questions
0
votes
1 answer

How to use CUnit to test a native application with multiple components

I have a gradle project for a native c application in gradle (version 2.10) made from multiple components: components { component_1(NativeLibrarySpec) component_2(NativeLibrarySpec) ... component_n(NativeLibrarySpec) …
pablochacin
  • 947
  • 1
  • 14
  • 35
0
votes
0 answers

Installing / Compiling tarball in Windows

I have been asked to 'get' CUnit (the C testing framework) on my machine (windows 10 Pro x64). However, when i came to downloading it, I noticed that it was in a "tarball" file format (tar.bz2). Ideally, I would like to be able to launch testing…
Lorenzo Battilocchi
  • 862
  • 1
  • 10
  • 26
0
votes
0 answers

Autotools: add library globally for multiple targets

My project has the following Makefile.am file and it fails to ./configure because the CUnit function symbols are not found. bin_PROGRAMS = test_one test_two AM_CFLAGS = -Wall -pedantic -I../src AM_LDFLAGS = \ -Wl,-z,relro \ …
A. Gille
  • 912
  • 6
  • 23
0
votes
1 answer

Unit Testing: CUnit

This one is causing grief; I'd like to get to grips with CUnit. Have installed it using the following instructions: http://macappstore.org/cunit/ I am using the following at command line: gcc myprog.c -Wall -Wfloat-equal -Wextra -O2 -pedantic -ansi…
user7140392
0
votes
1 answer

CUnit assertion Assertion `((void *)0) != f_pCurSuite' failed

My code looks like this: #include int maxi(int i1, int i2) { return (i1 > i2) ? i1 : i2; } void test_maxi(void) { CU_ASSERT(maxi(0,2) == 2); } int main() { test_maxi(); return 0; } I compiled it using gcc test.c…
prompteus
  • 1,051
  • 11
  • 26
0
votes
1 answer

Clean up after exception Google c++ test framework

I am using C++ unit tests using the google unit test framework (fixtures), clean up after the tests is very important for me. But in case of an exception the executable crashes and the clean up never happens. Is there a way to force the clean up…
user1918858
  • 1,202
  • 1
  • 20
  • 29
0
votes
1 answer

How to install CUnit on Windows

I've downloaded the library to my desktop but when I try and install it by running the ./configure command I get an error: bash: ./configure: No such file or directory I've looked at 2 existing questions on SO (link1 and link2) but they didn't solve…
jhj
  • 41
  • 1
  • 7
0
votes
1 answer

Netbeans CUnit runs once per application launch

I am using Netbeans 8.1 with CUnit testing. I can run and test my project just fine, and it spits out the correct results. However, when I try to test it again it does not give me results. Instead it only says: CUnit - A unit testing framework for…
WarSame
  • 870
  • 1
  • 10
  • 24
0
votes
1 answer

Error building CUnit on Windows

Since yesterday i'm trying to install CUnit on my computer. I know how to do it because it worked on my college computer. I used this topic Building CUnit on Windows, i'm sure that the answer works. But on my personnal PC i'm having a problem after…
0
votes
1 answer

Building CUnit with cygwin on windows

Can anyone explain me, how to build CUnit on Windows using cygwin? Only found an example using mingw Building CUnit on Windows Call of make Fails (no such command). Anyone help me?
user1038155
0
votes
1 answer

CUnit (undefined reference)

I need to write a program using C and CUnit to test some simple stack functions and using "Makefile" but when I try to compile it, I always get the same errors. The terminal on ubuntu show this when I write the "make" command: gcc -o Pilhaa_teste.o…
バカです
  • 175
  • 2
  • 4
  • 18
0
votes
2 answers

C - Ignoring user inputs in CUnit?

I've been search around for an answer but I haven't found one. The thing is, I need to do some test cases for a program I've written in C. The thing is, some functions take in an user input which makes my test cases to wait for an input, which is…
drante
  • 129
  • 9
0
votes
1 answer

CUnit - Errors when trying to build using makefile or gcc

So I went to this website to download the CUnit framework. I downloaded the folder into my Downloads folder using the following commands. I am getting a lot of errors shown below. Any help would be great. Break it down for me I am a Linux…
Andre Marin
  • 540
  • 1
  • 6
  • 16
0
votes
0 answers

How to link main.c with CUnit library in terminal?

I am working with CUnit and learning test driven development. Please can someone help me out with the compilation part. my command in terminal is: gcc -main.c -o main this is obviously not correct as i get the following output : FOR EVERY…
satej k
  • 89
  • 2
  • 13
0
votes
0 answers

deferencing pointer to incomplete type C Struct CUNIT

Excuse me i'm getting this error deferencing pointer to incomplete type,i have defined buffer_t in a buffer.c file, and i'm in CUNIT i initialize the buffer before each test #include "msg.h" #include #include #include…
user2993592
  • 31
  • 2
  • 6