aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-tool.c
diff options
context:
space:
mode:
authorChandra Pratap <chandrapratap3519@gmail.com>2024-09-08 09:35:56 +0530
committerJunio C Hamano <gitster@pobox.com>2024-09-08 13:24:03 -0700
commit15e29ea1c648149304b31d662b286718d0e6fde8 (patch)
tree24955588cea516a74d5def64c1ebc7d9095393cf /t/helper/test-tool.c
parent2e7b89e038c0c888acf61f1b4ee5a43d4dd5e94c (diff)
downloadgit-15e29ea1c648149304b31d662b286718d0e6fde8.tar.gz
t: move reftable/stack_test.c to the unit testing framework
reftable/stack_test.c exercises the functions defined in reftable/stack.{c, h}. Migrate reftable/stack_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 be in-line with unit-tests' standards. Since some of the tests use set_test_hash() defined by reftable/test_framework.{c, h} but these files are not '#included' in the test file, copy this function in the ported test file. With the migration of stack test to the unit-tests framework, "test-tool reftable" becomes a no-op. Hence, get rid of everything that uses "test-tool reftable" alongside everything that is used to implement it. While at it, alphabetically sort the cmds[] list in helper/test-tool.c by moving the entry for "dump-reftable". Mentored-by: Patrick Steinhardt <ps@pks.im> Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-tool.c')
-rw-r--r--t/helper/test-tool.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index f8a67df7de..252fa5de63 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -26,6 +26,7 @@ static struct test_cmd cmds[] = {
{ "drop-caches", cmd__drop_caches },
{ "dump-cache-tree", cmd__dump_cache_tree },
{ "dump-fsmonitor", cmd__dump_fsmonitor },
+ { "dump-reftable", cmd__dump_reftable },
{ "dump-split-index", cmd__dump_split_index },
{ "dump-untracked-cache", cmd__dump_untracked_cache },
{ "env-helper", cmd__env_helper },
@@ -61,9 +62,7 @@ static struct test_cmd cmds[] = {
{ "read-graph", cmd__read_graph },
{ "read-midx", cmd__read_midx },
{ "ref-store", cmd__ref_store },
- { "reftable", cmd__reftable },
{ "rot13-filter", cmd__rot13_filter },
- { "dump-reftable", cmd__dump_reftable },
{ "regex", cmd__regex },
{ "repository", cmd__repository },
{ "revision-walking", cmd__revision_walking },