t/helper: merge test-hashmap into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-03-24 08:44:43 +01:00
committed by Junio C Hamano
parent c680668d1a
commit 7c18cbd562
5 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,4 @@
#include "test-tool.h"
#include "git-compat-util.h"
#include "hashmap.h"
#include "strbuf.h"
@ -77,7 +78,7 @@ static unsigned int hash(unsigned int method, unsigned int i, const char *key)
/*
* Test performance of hashmap.[ch]
* Usage: time echo "perfhashmap method rounds" | test-hashmap
* Usage: time echo "perfhashmap method rounds" | test-tool hashmap
*/
static void perf_hashmap(unsigned int method, unsigned int rounds)
{
@ -144,7 +145,7 @@ static void perf_hashmap(unsigned int method, unsigned int rounds)
*
* perfhashmap method rounds -> test hashmap.[ch] performance
*/
int cmd_main(int argc, const char **argv)
int cmd__hashmap(int argc, const char **argv)
{
struct strbuf line = STRBUF_INIT;
struct hashmap map;