HomeClusterLabs Projects

Test: Convert from using glib to using cmocka.

Description

Test: Convert from using glib to using cmocka.

The benefit of this is that we'll be able to mock up objects in the
future, which should allow for unit testing functions that would
otherwise be difficult to test.

This is a big patch, but the changes are simple:

  • Add a block of includes at the top of each file.
  • Add -lcmocka to every Makefile.am.
  • Change the unit test function headers.
  • Convert to the new assertion macros, which for the most part are very easy changes.
  • Convert all the main functions, most notably getting rid of the test case namespacing thing.

Details

Provenance
clumensAuthored on Aug 30 2021, 1:54 PM
Parents
rP1f618db9d50f: Merge pull request #2504 from kgaillot/best-practices
Branches
Unknown
Tags
Unknown

Event Timeline