Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t/helper: merge test-prio-queue into test-tool
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 24 Mar 2018 07:44:50 +0000
(08:44 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 27 Mar 2018 15:45:47 +0000
(08:45 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
patch
|
blob
|
history
t/helper/test-prio-queue.c
patch
|
blob
|
history
t/helper/test-tool.c
patch
|
blob
|
history
t/helper/test-tool.h
patch
|
blob
|
history
t/t0009-prio-queue.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (from parent 1:
b8d5cf4
)
diff --git
a/Makefile
b/Makefile
index 751ea6cad746a39e9973e3291f00b346b0cef718..076c7784947d98c4b5715bc1799f12c6ce29cd79 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-670,6
+670,7
@@
TEST_BUILTINS_OBJS += test-mergesort.o
TEST_BUILTINS_OBJS += test-mktemp.o
TEST_BUILTINS_OBJS += test-online-cpus.o
TEST_BUILTINS_OBJS += test-path-utils.o
TEST_BUILTINS_OBJS += test-mktemp.o
TEST_BUILTINS_OBJS += test-online-cpus.o
TEST_BUILTINS_OBJS += test-path-utils.o
+TEST_BUILTINS_OBJS += test-prio-queue.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@
-677,7
+678,6
@@
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
-TEST_PROGRAMS_NEED_X += test-prio-queue
TEST_PROGRAMS_NEED_X += test-read-cache
TEST_PROGRAMS_NEED_X += test-write-cache
TEST_PROGRAMS_NEED_X += test-ref-store
TEST_PROGRAMS_NEED_X += test-read-cache
TEST_PROGRAMS_NEED_X += test-write-cache
TEST_PROGRAMS_NEED_X += test-ref-store
diff --git
a/t/helper/test-prio-queue.c
b/t/helper/test-prio-queue.c
index ae58fff35972a09c08a47d2bc0abb67c96ba20eb..9807b649b14c0002bee6d10b200c27bb89a54812 100644
(file)
--- a/
t/helper/test-prio-queue.c
+++ b/
t/helper/test-prio-queue.c
@@
-1,3
+1,4
@@
+#include "test-tool.h"
#include "cache.h"
#include "prio-queue.h"
#include "cache.h"
#include "prio-queue.h"
@@
-16,7
+17,7
@@
static void show(int *v)
free(v);
}
free(v);
}
-int cmd_
main
(int argc, const char **argv)
+int cmd_
_prio_queue
(int argc, const char **argv)
{
struct prio_queue pq = { intcmp };
{
struct prio_queue pq = { intcmp };
diff --git
a/t/helper/test-tool.c
b/t/helper/test-tool.c
index baec861cc248b9a3f940944574bd140e6849bccc..64af0bbe94f1661436ba0de176c67a49008a0c04 100644
(file)
--- a/
t/helper/test-tool.c
+++ b/
t/helper/test-tool.c
@@
-25,6
+25,7
@@
static struct test_cmd cmds[] = {
{ "mktemp", cmd__mktemp },
{ "online-cpus", cmd__online_cpus },
{ "path-utils", cmd__path_utils },
{ "mktemp", cmd__mktemp },
{ "online-cpus", cmd__online_cpus },
{ "path-utils", cmd__path_utils },
+ { "prio-queue", cmd__prio_queue },
{ "sha1", cmd__sha1 },
};
{ "sha1", cmd__sha1 },
};
diff --git
a/t/helper/test-tool.h
b/t/helper/test-tool.h
index 3b7ced01f5154df550f583cdff2f15398210e34c..900c96dc0274045cdfbda09c47059327c795219f 100644
(file)
--- a/
t/helper/test-tool.h
+++ b/
t/helper/test-tool.h
@@
-19,6
+19,7
@@
int cmd__mergesort(int argc, const char **argv);
int cmd__mktemp(int argc, const char **argv);
int cmd__online_cpus(int argc, const char **argv);
int cmd__path_utils(int argc, const char **argv);
int cmd__mktemp(int argc, const char **argv);
int cmd__online_cpus(int argc, const char **argv);
int cmd__path_utils(int argc, const char **argv);
+int cmd__prio_queue(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
#endif
int cmd__sha1(int argc, const char **argv);
#endif
diff --git
a/t/t0009-prio-queue.sh
b/t/t0009-prio-queue.sh
index 94045c3fad18d94e0e83acf757594cede066134b..e56dfce6680298c133bc2b2de12d9492fda66b7a 100755
(executable)
--- a/
t/t0009-prio-queue.sh
+++ b/
t/t0009-prio-queue.sh
@@
-17,7
+17,7
@@
cat >expect <<'EOF'
10
EOF
test_expect_success 'basic ordering' '
10
EOF
test_expect_success 'basic ordering' '
- test-prio-queue 2 6 3 10 9 5 7 4 5 8 1 dump >actual &&
+ test-
tool
prio-queue 2 6 3 10 9 5 7 4 5 8 1 dump >actual &&
test_cmp expect actual
'
test_cmp expect actual
'
@@
-30,7
+30,7
@@
cat >expect <<'EOF'
6
EOF
test_expect_success 'mixed put and get' '
6
EOF
test_expect_success 'mixed put and get' '
- test-prio-queue 6 2 4 get 5 3 get get 1 dump >actual &&
+ test-
tool
prio-queue 6 2 4 get 5 3 get get 1 dump >actual &&
test_cmp expect actual
'
test_cmp expect actual
'
@@
-43,7
+43,7
@@
NULL
NULL
EOF
test_expect_success 'notice empty queue' '
NULL
EOF
test_expect_success 'notice empty queue' '
- test-prio-queue 1 2 get get get 1 2 get get get >actual &&
+ test-
tool
prio-queue 1 2 get get get 1 2 get get get >actual &&
test_cmp expect actual
'
test_cmp expect actual
'