[GSoC][PATCH 00/10] t: port reftable/block_test.c to the unit testing framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The reftable library comes with self tests, which are exercised
as part of the usual end-to-end tests and are designed to
observe the end-user visible effects of Git commands. What it
exercises, however, is a better match for the unit-testing
framework, merged at 8bf6fbd0 (Merge branch 'js/doc-unit-tests',
2023-12-09), which is designed to observe how low level
implementation details, at the level of sequences of individual
function calls, behave.

Hence, port reftable/block_test.c to the unit testing framework and
improve upon the ported test. The first patch in the series moves
the test to the unit testing framework, and the rest of the patches
improve upon the ported test.

Mentored-by: Patrick Steinhardt <ps@xxxxxx>
Mentored-by: Christian Couder <chriscool@xxxxxxxxxxxxx>
Signed-off-by: Chandra Pratap <chandrapratap3519@xxxxxxxxx>

---
CI/PR: https://github.com/gitgitgadget/git/pull/1749

Chandra Pratap(10):
t: move reftable/block_test.c to the unit testing framework
t-reftable-block: release used block reader
t-reftable-block: use reftable_record_equal() instead of check_str()
t-reftable-block: use reftable_record_key() instead of strbuf_addstr()
t-reftable-block: use block_iter_reset() instead of block_iter_close()
t-reftable-block: use xstrfmt() instead of xstrdup()
t-reftable-block: remove unnecessary variable 'j'
t-reftable-block: add tests for log blocks
t-reftable-block: add tests for obj blocks
t-reftable-block: add tests for index blocks

Makefile                        |   2 +-
reftable/block_test.c           | 123 --------------
reftable/reftable-tests.h       |   1 -
t/helper/test-reftable.c        |   1 -
t/unit-tests/t-reftable-block.c | 359 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 360 insertions(+), 126 deletions(-)




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux