From 145eca9d9f8caf8c3c084ec82b43dc1ee52870d2 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 29 Nov 2023 10:47:03 -0500 Subject: [PATCH] tests: normalize inclusions of tap/tap.h Use "tap/tap.h" instead of everywhere. Move the inclusion at the end of the inclusion list everywhere. tap.h defines macros with common names like `ok` and `fail`, which can clash if defined before including other files. Let's establish the practice of including tap.h last. Change-Id: Ic06f59d146390d6fe21a6ac229972df02ce8d762 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/11461 Tested-by: jenkins --- tests/bitfield/test-bitfield.c | 2 +- tests/lib/test-bt-uuid.c | 4 ++-- ...test-remove-destruction-listener-in-destruction-listener.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/bitfield/test-bitfield.c b/tests/bitfield/test-bitfield.c index f0b44821..017ebeb3 100644 --- a/tests/bitfield/test-bitfield.c +++ b/tests/bitfield/test-bitfield.c @@ -11,7 +11,7 @@ #include #include -#include +#include "tap/tap.h" unsigned int glob; diff --git a/tests/lib/test-bt-uuid.c b/tests/lib/test-bt-uuid.c index 56136ac5..5b0c3bed 100644 --- a/tests/lib/test-bt-uuid.c +++ b/tests/lib/test-bt-uuid.c @@ -7,10 +7,10 @@ #include #include -#include - #include "common/uuid.h" +#include "tap/tap.h" + #define NR_TESTS 23 static const char valid_str_1[] = "3d260c88-75ea-47b8-a7e2-d6077c0378d9"; diff --git a/tests/lib/test-remove-destruction-listener-in-destruction-listener.c b/tests/lib/test-remove-destruction-listener-in-destruction-listener.c index 7aae2f98..806e5613 100644 --- a/tests/lib/test-remove-destruction-listener-in-destruction-listener.c +++ b/tests/lib/test-remove-destruction-listener-in-destruction-listener.c @@ -11,9 +11,10 @@ #include #include -#include #include +#include "tap/tap.h" + #define NR_TESTS 16 static bt_listener_id trace_class_destroyed_1_id; -- 2.34.1