diff options
| author | Chandra Pratap <chandrapratap3519@gmail.com> | 2024-07-02 12:52:14 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-07-02 08:12:24 -0700 |
| commit | ba9661b457effa34b6f6188e10546d00e4a49d54 (patch) | |
| tree | 6d5907ba1fce3603efa22c09ab2a98583b5e2dd1 /t/unit-tests/t-reftable-basics.c | |
| parent | d63586cb314731c851f28e14fc8012988467e2da (diff) | |
| download | git-ba9661b457effa34b6f6188e10546d00e4a49d54.tar.gz | |
t: move reftable/record_test.c to the unit testing framework
reftable/record_test.c exercises the functions defined in
reftable/record.{c, h}. Migrate reftable/record_test.c to the
unit testing framework. Migration involves refactoring the tests
to use the unit testing framework instead of reftable's test
framework, and renaming the tests to fit unit-tests' naming scheme.
While at it, change the type of index variable 'i' to 'size_t'
from 'int'. This is because 'i' is used in comparison against
'ARRAY_SIZE(x)' which is of type 'size_t'.
Also, use set_hash() which is defined locally in the test file
instead of set_test_hash() which is defined by
reftable/test_framework.{c, h}. This is fine to do as both these
functions are similarly implemented, and
reftable/test_framework.{c, h} is not #included in the ported test.
Get rid of reftable_record_print() from the tests as well, because
it clutters the test framework's output and we have no way of
verifying the output.
Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
Acked-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-reftable-basics.c')
0 files changed, 0 insertions, 0 deletions
