mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
e031e9719d
Adapt the qsort certification program from "Engineering a Sort Function" by Bentley and McIlroy for testing our linked list sort function. It generates several lists with various distribution patterns and counts the number of operations llist_mergesort() needs to order them. It compares the result to the output of a trusted sort function (qsort(1)) and also checks if the sort is stable. Also add a test script that makes use of the new subcommand. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 lines
151 B
Bash
Executable file
11 lines
151 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='verify sort functions'
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'llist_mergesort()' '
|
|
test-tool mergesort test
|
|
'
|
|
|
|
test_done
|