mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 08:20:01 -04:00
The cmocka.h header MUST be included before isc/util.h gets included
The isc/util.h header redefine the DbC checks (REQUIRE, INSIST, ...) to
be cmocka "fake" assertions. However that means that cmocka.h needs to
be included after UNIT_TESTING is defined but before isc/util.h is
included. Because isc/util.h is included in most of the project headers
this means that the sequence MUST be:
#define UNIT_TESTING
#include <cmocka.h>
#include <isc/_anything_.h>
See !2204 for other header requirements for including cmocka.h.
This commit is contained in:
parent
c26a2ea134
commit
0ba697fe8c
1 changed files with 2 additions and 0 deletions
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#define UNIT_TESTING
|
||||
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <isc/atomic.h>
|
||||
#include <isc/cmocka.h>
|
||||
#include <isc/commandline.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue