Tanay Abhra <tanay...@gmail.com> writes:

> I have run the tests and debug the code using custom functions and it works
> fine.

I understand that you wrote the custom functions for you, but didn't
include them in the patch, right?

If so, wouldn't it make sense to include these as unit-tests for your
code? See what Git already does with test-*.c, e.g.

$ git grep test-hashmap
Documentation/technical/api-hashmap.txt:See test-hashmap.c for an example using 
arbitrary-length strings as keys.
Makefile:TEST_PROGRAMS_NEED_X += test-hashmap
t/t0011-hashmap.sh:     echo "$1" | test-hashmap $3 > actual &&
t/t0011-hashmap.sh:     cat in | test-hashmap > out &&
test-hashmap.c: * Usage: time echo "perfhashmap method rounds" | test-hashmap

for examples. The resulting binary would be a good candidate for
valgrind --leak-check=full.

The tests are not just for you, they are also:

* For reviewers, to show an example of correct usage of the new API,

* For people of the future, to avoid regressions.

Matthieu Moy
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to