cunit

How to create a JNIEnv mock in C/C++

I am writing some JNI code in C that I wish to test using cunit. In order to call the JNI functions, I need to create a valid JNIEnv struct. Does anyone know if there is a mocking framework for such a purpose, or who can give me some pointers on how to create a mock JNIEnv struct myself? ...

Is there a framework for running unit tests on Apache C modules?

Hi, I am about to make some changes to an existing Apache C module to fix some possible security flaws and general bad practices. However the functionality of the code must remain unchanged (except in cases where its fixing a bug). Standard regression testing stuff seems to be in order. I would like to know if anyone knows of a good wa...

Autogeneration of tests and stubs with CUnit.

Does anybody know of a free/commercial tool that would automatically generate tests and stubs for C code to work with CUnit framework? ...

Is there a recommended way to set environment variables for CUnit tests?

We want to use CUnit to test a shared library that we have developed. The shared library is loaded via the standard Solaris LD_PRELOAD mechanism where it uses an environment variable to remap a string containing a file path to a new date and time based on the file path. Initial testing will use a single value for the environment variab...

Symbol not found - CUnit on Snow Leopard

Hi, I just installed CUnit on Snow Leopard with MacPorts/DarwinPorts. The installation went fine, however, I get en error when trying to run the unit tests: dyld: Symbol not found: _acs_map Referenced from: /opt/local/lib/libcunit.1.dylib Expected in: flat namespace in /opt/local/lib/libcunit.1.dylib Trace/BPT trap Has anyone co...