Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using unit testing framework for C Check

I am trying to use unit testing framework for C called Check.

I installed the package as instructed on the file INSTALL in the package:

  1. ./configure
  2. make
  3. make check -> run self-tests that come with the package (pass successfully).
  4. make install

After doing that I failed to run my own test so finally I decided to use the package example in /usr/local/share/doc/check/example.

Did the following commands:

$ autoreconf --install
$ ./configure
$ make
$ make check

And still the same problem :

/usr/local/share/doc/check/example/tests/.libs/lt-check_money: error while loading shared libraries: libcheck.so.0: cannot open shared object file: No such file or directory
FAIL: check_money

Tried to add the directory to LDFLAGS in the make file but that did not help, also tried to do what Rick Hightower did here (...deleting the *.so files (and their links)) by I don't know how to remove the links

like image 966
Hagai Avatar asked Aug 14 '10 09:08

Hagai


People also ask

What can be used for unit testing in C?

The most scalable way to write unit tests in C is using a unit testing framework, such as: CppUTest. Unity. Google Test.

Does C have unit testing?

A Unit Testing Framework for CCUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces.

Which framework is used for unit testing?

JUnit is an open source framework you can use to write and run tests. It aims to help develop bug-free and reliable code written in Java. JUnit provides test runners that run tests and assertions to test the expected results.

What are the frameworks to write unit test cases in C#?

The three major C# Unit testing frameworks are MSTest, NUnitNUnitNUnit is an open-source unit testing framework for the . NET Framework and Mono. It serves the same purpose as JUnit does in the Java world, and is one of many programs in the xUnit family.https://en.wikipedia.org › wiki › NUnitNUnit - Wikipedia, and xUnit.Net. You should select the most appropriate test framework that suits your project requirements.


1 Answers

Try running ldconfig (ie. sudo ldconfig) to rebuild the runtime linker cache.

like image 100
Nordic Mainframe Avatar answered Sep 18 '22 09:09

Nordic Mainframe