mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 10:22:06 -04:00
Unify header ordering in unit tests
Make sure all unit tests include headers in a similar order: 1. Three headers which must be included before <cmocka.h>. 2. System headers. 3. UNIT_TESTING definition, followed by the <cmocka.h> header. 4. libisc headers. 5. Headers from other BIND libraries. 6. Local headers. Also make sure header file names are sorted alphabetically within each block of #include directives.
This commit is contained in:
parent
59528d0e9d
commit
5381ac0fcc
21 changed files with 46 additions and 56 deletions
|
|
@ -26,11 +26,12 @@
|
|||
#include <isc/util.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
#include <pk11/site.h>
|
||||
|
||||
#include <dns/name.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include <pk11/site.h>
|
||||
|
||||
#include "../dst_internal.h"
|
||||
|
||||
#include "dnstest.h"
|
||||
|
|
|
|||
|
|
@ -23,13 +23,12 @@
|
|||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isc/file.h>
|
||||
#include <isc/hex.h>
|
||||
#include <isc/util.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
|
|
|||
|
|
@ -24,10 +24,9 @@
|
|||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/cache.h>
|
||||
#include <dns/callbacks.h>
|
||||
|
|
|
|||
|
|
@ -25,12 +25,6 @@
|
|||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <dns/rbt.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/compress.h>
|
||||
#include "dnstest.h"
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
|
|
@ -40,19 +34,25 @@
|
|||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/timer.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/compress.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rbt.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include "dnstest.h"
|
||||
|
||||
#ifndef MAP_FILE
|
||||
#define MAP_FILE 0
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,14 +22,13 @@
|
|||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/timer.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/dispatch.h>
|
||||
#include <dns/name.h>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@
|
|||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/list.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stdtime.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
|
|
@ -39,13 +45,6 @@
|
|||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/list.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/stdtime.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include "../zone_p.h"
|
||||
|
||||
#include "dnstest.h"
|
||||
|
|
|
|||
|
|
@ -23,10 +23,9 @@
|
|||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@
|
|||
|
||||
#if HAVE_CMOCKA
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
|
|
|
|||
|
|
@ -11,12 +11,13 @@
|
|||
|
||||
#if HAVE_CMOCKA
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/errno.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
|
|
|
|||
|
|
@ -27,11 +27,10 @@
|
|||
#include <isc/buffer.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/hex.h>
|
||||
#include <isc/region.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <pk11/site.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
#include <regex.h>
|
||||
#endif
|
||||
|
||||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/regex.h>
|
||||
#include <isc/print.h>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include <isc/taskpool.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
||||
#include "isctest.h"
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
|
|
|
|||
|
|
@ -16,11 +16,8 @@
|
|||
#include <setjmp.h>
|
||||
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,11 +16,8 @@
|
|||
#include <setjmp.h>
|
||||
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,16 +15,15 @@
|
|||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/platform.h>
|
||||
#include <isc/result.h>
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@
|
|||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <sched.h> /* IWYU pragma: keep */
|
||||
#include <stdbool.h>
|
||||
|
|
@ -26,13 +24,14 @@
|
|||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/badcache.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <ns/client.h>
|
||||
#include <ns/hooks.h>
|
||||
#include <ns/query.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include "nstest.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue