Ramkumar Ramachandra wrote: > Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: >> Also: http://www.canonware.com/trp/ seems to provide a test program; >> do you think it would make sense to include it as well? > > Probably in documentation/technical? I was thinking in the toplevel, but I wasn’t thinking about how much of trp.h was removed. Of course svn-fe itself is a pretty good test that the treap is working as it should. So I wouldn’t worry about it. Jonathan Makefile | 1 + t/t0070-fundamental.sh | 4 ++++ test-treap.c | 8 ++++++++ 3 files changed, 13 insertions(+), 0 deletions(-) create mode 100644 test-treap.c diff --git a/Makefile b/Makefile index 2f5d631..a26bceb 100644 --- a/Makefile +++ b/Makefile @@ -403,6 +403,7 @@ TEST_PROGRAMS_NEED_X += test-path-utils TEST_PROGRAMS_NEED_X += test-run-command TEST_PROGRAMS_NEED_X += test-sha1 TEST_PROGRAMS_NEED_X += test-sigchain +TEST_PROGRAMS_NEED_X += test-treap TEST_PROGRAMS_NEED_X += test-index-version TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X)) diff --git a/t/t0070-fundamental.sh b/t/t0070-fundamental.sh index 680d7d6..7522bdc 100755 --- a/t/t0070-fundamental.sh +++ b/t/t0070-fundamental.sh @@ -12,4 +12,8 @@ test_expect_success 'character classes (isspace, isalpha etc.)' ' test-ctype ' +test_expect_success 'treap data structure' ' + test-treap +' + test_done diff --git a/test-treap.c b/test-treap.c new file mode 100644 index 0000000..f94a931 --- /dev/null +++ b/test-treap.c @@ -0,0 +1,8 @@ +#include "git-compat-util.h" +#include "vcs-svn/trp.h" +#include "vcs-svn/obj_pool.h" + +#define NNODES 32 +#define NSETS 200 + +tests go here -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html