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
-1
votes
2 answers

How to install CUnit on Ubuntu?

I am having a problem in installing CUnit on Ubuntu. I tried sudo apt install libcunit1 libcunit1-doc libcunit1-dev after the command CUnit --version says command not found. I searched and was unable to find anything. Does anyone have a reliable…
arslan
  • 2,034
  • 7
  • 34
  • 61
-1
votes
1 answer

libcunit.so.1 missing after install of CUnit-2.1-2-src.tar.bz2

This is the only tar on the site.. no help online.. Is there some parameter I missed? where do I get this lib?
Cooon
  • 51
  • 1
  • 1
  • 7
-1
votes
1 answer

Cunit Testing free memory twice

excuse me i know that i should not free() twice a pointer, but how can i check if is not already free ? checking if null ? i don't know beacuse somebody told me that the free() comand doesn't write null in memory but simply deallocates the…
user2993592
  • 31
  • 2
  • 6
-3
votes
1 answer

Unit Testing on a c code which writes on files in a particular directory

I've written a C code which takes a path to a directory and a string s. After opening the directory, the code looks for files with a particular extension and write the string given as a second argument to the last line of these files and a \n after…
jamal
  • 543
  • 1
  • 4
  • 5
-3
votes
1 answer

How to obtain the real output from a C function?

I am having difficulty getting the real output from a C function. For example: int max3(int a, int b, int c){ if ((a>b)&&(a>c)) return a; if ((b>c)&&(b>a)) return b; return c; } Can you give me an idea of how to…
ducanhnguyen
  • 161
  • 1
  • 10
1 2 3 4 5
6