mirror of
https://github.com/git/git.git
synced 2024-12-12 03:14:11 +08:00
ed54840872
helper/test-oidtree.c along with t0069-oidtree.sh test the oidtree.h library, which is a wrapper around crit-bit tree. Migrate them to the unit testing framework for better debugging and runtime performance. Along with the migration, add an extra check for oidtree_each() test, which showcases how multiple expected matches can be given to check_each() helper. To achieve this, introduce a new library called 'lib-oid.h' exclusively for the unit tests to use. It currently mainly includes utility to generate object_id from an arbitrary hex string (i.e. '12a' -> '12a0000000000000000000000000000000000000'). This also handles the hash algo selection based on GIT_TEST_DEFAULT_HASH. This library will also be helpful when we port other unit tests such as oid-array, oidset etc. Helped-by: Junio C Hamano <gitster@pobox.com> Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com> [jc: small fixlets squashed in] Signed-off-by: Junio C Hamano <gitster@pobox.com>
92 lines
4.1 KiB
C
92 lines
4.1 KiB
C
#ifndef TEST_TOOL_H
|
|
#define TEST_TOOL_H
|
|
|
|
#include "git-compat-util.h"
|
|
|
|
int cmd__advise_if_enabled(int argc, const char **argv);
|
|
int cmd__bitmap(int argc, const char **argv);
|
|
int cmd__bloom(int argc, const char **argv);
|
|
int cmd__bundle_uri(int argc, const char **argv);
|
|
int cmd__cache_tree(int argc, const char **argv);
|
|
int cmd__chmtime(int argc, const char **argv);
|
|
int cmd__config(int argc, const char **argv);
|
|
int cmd__crontab(int argc, const char **argv);
|
|
int cmd__csprng(int argc, const char **argv);
|
|
int cmd__date(int argc, const char **argv);
|
|
int cmd__delta(int argc, const char **argv);
|
|
int cmd__delete_gpgsig(int argc, const char **argv);
|
|
int cmd__dir_iterator(int argc, const char **argv);
|
|
int cmd__drop_caches(int argc, const char **argv);
|
|
int cmd__dump_cache_tree(int argc, const char **argv);
|
|
int cmd__dump_fsmonitor(int argc, const char **argv);
|
|
int cmd__dump_split_index(int argc, const char **argv);
|
|
int cmd__dump_untracked_cache(int argc, const char **argv);
|
|
int cmd__dump_reftable(int argc, const char **argv);
|
|
int cmd__env_helper(int argc, const char **argv);
|
|
int cmd__example_decorate(int argc, const char **argv);
|
|
int cmd__example_tap(int argc, const char **argv);
|
|
int cmd__find_pack(int argc, const char **argv);
|
|
int cmd__fsmonitor_client(int argc, const char **argv);
|
|
int cmd__genrandom(int argc, const char **argv);
|
|
int cmd__genzeros(int argc, const char **argv);
|
|
int cmd__getcwd(int argc, const char **argv);
|
|
int cmd__hashmap(int argc, const char **argv);
|
|
int cmd__hash_speed(int argc, const char **argv);
|
|
int cmd__hexdump(int argc, const char **argv);
|
|
int cmd__json_writer(int argc, const char **argv);
|
|
int cmd__lazy_init_name_hash(int argc, const char **argv);
|
|
int cmd__match_trees(int argc, const char **argv);
|
|
int cmd__mergesort(int argc, const char **argv);
|
|
int cmd__mktemp(int argc, const char **argv);
|
|
int cmd__oidmap(int argc, const char **argv);
|
|
int cmd__online_cpus(int argc, const char **argv);
|
|
int cmd__pack_mtimes(int argc, const char **argv);
|
|
int cmd__parse_options(int argc, const char **argv);
|
|
int cmd__parse_options_flags(int argc, const char **argv);
|
|
int cmd__parse_pathspec_file(int argc, const char** argv);
|
|
int cmd__parse_subcommand(int argc, const char **argv);
|
|
int cmd__partial_clone(int argc, const char **argv);
|
|
int cmd__path_utils(int argc, const char **argv);
|
|
int cmd__pcre2_config(int argc, const char **argv);
|
|
int cmd__pkt_line(int argc, const char **argv);
|
|
int cmd__proc_receive(int argc, const char **argv);
|
|
int cmd__progress(int argc, const char **argv);
|
|
int cmd__reach(int argc, const char **argv);
|
|
int cmd__read_cache(int argc, const char **argv);
|
|
int cmd__read_graph(int argc, const char **argv);
|
|
int cmd__read_midx(int argc, const char **argv);
|
|
int cmd__ref_store(int argc, const char **argv);
|
|
int cmd__rot13_filter(int argc, const char **argv);
|
|
int cmd__reftable(int argc, const char **argv);
|
|
int cmd__regex(int argc, const char **argv);
|
|
int cmd__repository(int argc, const char **argv);
|
|
int cmd__revision_walking(int argc, const char **argv);
|
|
int cmd__run_command(int argc, const char **argv);
|
|
int cmd__scrap_cache_tree(int argc, const char **argv);
|
|
int cmd__serve_v2(int argc, const char **argv);
|
|
int cmd__sha1(int argc, const char **argv);
|
|
int cmd__sha1_is_sha1dc(int argc, const char **argv);
|
|
int cmd__oid_array(int argc, const char **argv);
|
|
int cmd__sha256(int argc, const char **argv);
|
|
int cmd__sigchain(int argc, const char **argv);
|
|
int cmd__simple_ipc(int argc, const char **argv);
|
|
int cmd__string_list(int argc, const char **argv);
|
|
int cmd__submodule(int argc, const char **argv);
|
|
int cmd__submodule_config(int argc, const char **argv);
|
|
int cmd__submodule_nested_repo_config(int argc, const char **argv);
|
|
int cmd__subprocess(int argc, const char **argv);
|
|
int cmd__trace2(int argc, const char **argv);
|
|
int cmd__truncate(int argc, const char **argv);
|
|
int cmd__userdiff(int argc, const char **argv);
|
|
int cmd__urlmatch_normalization(int argc, const char **argv);
|
|
int cmd__xml_encode(int argc, const char **argv);
|
|
int cmd__wildmatch(int argc, const char **argv);
|
|
#ifdef GIT_WINDOWS_NATIVE
|
|
int cmd__windows_named_pipe(int argc, const char **argv);
|
|
#endif
|
|
int cmd__write_cache(int argc, const char **argv);
|
|
|
|
int cmd_hash_impl(int ac, const char **av, int algo);
|
|
|
|
#endif
|