Skip to content

Commit bc93427

Browse files
Seyi007gitster
authored andcommitted
t/unit-tests: convert trailer test to use clar
Adapt trailer test file to use clar testing framework by using clar assertions where necessary. Split test into individual test functions for clarity and maintainability. Each test case now has its own function, making it easier to isolate failures and improve test readability. Mentored-by: Patrick Steinhardt <[email protected]> Mentored-by: Phillip Wood <[email protected]> Signed-off-by: Seyi Kuforiji <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6a64ac7 commit bc93427

File tree

4 files changed

+322
-319
lines changed

4 files changed

+322
-319
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,6 +1361,7 @@ CLAR_TEST_SUITES += u-reftable-tree
13611361
CLAR_TEST_SUITES += u-strbuf
13621362
CLAR_TEST_SUITES += u-strcmp-offset
13631363
CLAR_TEST_SUITES += u-strvec
1364+
CLAR_TEST_SUITES += u-trailer
13641365
CLAR_TEST_PROG = $(UNIT_TEST_BIN)/unit-tests$(X)
13651366
CLAR_TEST_OBJS = $(patsubst %,$(UNIT_TEST_DIR)/%.o,$(CLAR_TEST_SUITES))
13661367
CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/clar/clar.o
@@ -1377,7 +1378,6 @@ UNIT_TEST_PROGRAMS += t-reftable-reader
13771378
UNIT_TEST_PROGRAMS += t-reftable-readwrite
13781379
UNIT_TEST_PROGRAMS += t-reftable-record
13791380
UNIT_TEST_PROGRAMS += t-reftable-stack
1380-
UNIT_TEST_PROGRAMS += t-trailer
13811381
UNIT_TEST_PROGRAMS += t-urlmatch-normalization
13821382
UNIT_TEST_PROGS = $(patsubst %,$(UNIT_TEST_BIN)/%$X,$(UNIT_TEST_PROGRAMS))
13831383
UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o

t/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ clar_test_suites = [
99
'unit-tests/u-strbuf.c',
1010
'unit-tests/u-strcmp-offset.c',
1111
'unit-tests/u-strvec.c',
12+
'unit-tests/u-trailer.c',
1213
]
1314

1415
clar_sources = [
@@ -59,7 +60,6 @@ unit_test_programs = [
5960
'unit-tests/t-reftable-readwrite.c',
6061
'unit-tests/t-reftable-record.c',
6162
'unit-tests/t-reftable-stack.c',
62-
'unit-tests/t-trailer.c',
6363
'unit-tests/t-urlmatch-normalization.c',
6464
]
6565

t/unit-tests/t-trailer.c

Lines changed: 0 additions & 317 deletions
This file was deleted.

0 commit comments

Comments
 (0)