diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-08-28 10:53:10 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-08-28 17:33:20 -0400 |
commit | b3636fa8864913413455a050c5425447c9e98bc0 (patch) | |
tree | 4ade291bf5652e9e27535602b11edff5a78d08b8 /tests | |
parent | d1febdd40faf2f66a901c42377a6b6efaad1449c (diff) | |
download | bfs-b3636fa8864913413455a050c5425447c9e98bc0.tar.xz |
build: Move feature test macros to prelude.h
This replaces the explicit CPPFLAGS list in flags.mk with just
`-include src/prelude.h`, shortening our compiler command lines and
allowing them to be easily documented.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/alloc.c | 1 | ||||
-rw-r--r-- | tests/bfstd.c | 1 | ||||
-rw-r--r-- | tests/bit.c | 3 | ||||
-rw-r--r-- | tests/ioq.c | 1 | ||||
-rw-r--r-- | tests/list.c | 3 | ||||
-rw-r--r-- | tests/main.c | 1 | ||||
-rw-r--r-- | tests/sighook.c | 1 | ||||
-rw-r--r-- | tests/tests.h | 2 | ||||
-rw-r--r-- | tests/trie.c | 3 | ||||
-rw-r--r-- | tests/xspawn.c | 1 | ||||
-rw-r--r-- | tests/xtime.c | 3 | ||||
-rw-r--r-- | tests/xtouch.c | 2 |
12 files changed, 4 insertions, 18 deletions
diff --git a/tests/alloc.c b/tests/alloc.c index ec8e8f7..f91b428 100644 --- a/tests/alloc.c +++ b/tests/alloc.c @@ -1,7 +1,6 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" #include "tests.h" #include "alloc.h" diff --git a/tests/bfstd.c b/tests/bfstd.c index 068e371..fe64ff3 100644 --- a/tests/bfstd.c +++ b/tests/bfstd.c @@ -1,7 +1,6 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" #include "tests.h" #include "bfstd.h" diff --git a/tests/bit.c b/tests/bit.c index 854398c..1446b13 100644 --- a/tests/bit.c +++ b/tests/bit.c @@ -1,12 +1,11 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" +#include "tests.h" #include "bfs.h" #include "bit.h" #include "diag.h" -#include "tests.h" #include <limits.h> #include <stdint.h> diff --git a/tests/ioq.c b/tests/ioq.c index 61a924f..a2db813 100644 --- a/tests/ioq.c +++ b/tests/ioq.c @@ -1,7 +1,6 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" #include "tests.h" #include "bfstd.h" diff --git a/tests/list.c b/tests/list.c index 820fbe4..b3d74a1 100644 --- a/tests/list.c +++ b/tests/list.c @@ -1,11 +1,10 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" +#include "tests.h" #include "bfs.h" #include "list.h" -#include "tests.h" struct item { int n; diff --git a/tests/main.c b/tests/main.c index 9cbdcfb..dcb5d98 100644 --- a/tests/main.c +++ b/tests/main.c @@ -5,7 +5,6 @@ * Entry point for unit tests. */ -#include "prelude.h" #include "tests.h" #include "bfstd.h" diff --git a/tests/sighook.c b/tests/sighook.c index adc53d8..4121a44 100644 --- a/tests/sighook.c +++ b/tests/sighook.c @@ -1,7 +1,6 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" #include "tests.h" #include "atomic.h" diff --git a/tests/tests.h b/tests/tests.h index 2c1eb3a..4c6b3d2 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -8,8 +8,6 @@ #ifndef BFS_TESTS_H #define BFS_TESTS_H -#include "prelude.h" - #include "bfstd.h" #include "diag.h" diff --git a/tests/trie.c b/tests/trie.c index 41b729e..9e9a294 100644 --- a/tests/trie.c +++ b/tests/trie.c @@ -1,11 +1,10 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" +#include "tests.h" #include "bfs.h" #include "diag.h" -#include "tests.h" #include "trie.h" #include <stdlib.h> diff --git a/tests/xspawn.c b/tests/xspawn.c index 20617de..3194adc 100644 --- a/tests/xspawn.c +++ b/tests/xspawn.c @@ -1,7 +1,6 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" #include "tests.h" #include "alloc.h" diff --git a/tests/xtime.c b/tests/xtime.c index 6d7716d..c87a69e 100644 --- a/tests/xtime.c +++ b/tests/xtime.c @@ -1,12 +1,11 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" +#include "tests.h" #include "bfs.h" #include "bfstd.h" #include "diag.h" -#include "tests.h" #include "xtime.h" #include <errno.h> diff --git a/tests/xtouch.c b/tests/xtouch.c index 705d4e2..e7c2e00 100644 --- a/tests/xtouch.c +++ b/tests/xtouch.c @@ -1,8 +1,6 @@ // Copyright © Tavian Barnes <tavianator@tavianator.com> // SPDX-License-Identifier: 0BSD -#include "prelude.h" - #include "bfstd.h" #include "sanity.h" #include "xtime.h" |