I keep coming across simple bugs in untested APIs, and sometimes I try
to write simple unit tests for those APIs. To make this easier, I have
started to create a "svn_test__sandbox" class, with which a C test can
very easily set up a repository and a working copy, like the Python
tests do. Then it can run the low-level functions that it is
test_read_write_tree_conflicts(const svn_test_opts_t *opts,
That may not be the purist way to perform unit testing, but it is very
practical. Many of the libsvn_wc tests are already using it.
I intend that it should have a set of utility functions like the Python
test suite's "sbox.simple_update()" etc. An example of this is
implemented in subversion/tests/libsvn_wc/op-depth-test.c, and used like
We can move it outside of tests/libsvn_wc to be available to the other
library tests as soon as we think it's useful enough.
I'm open to any feedback.
Received on 2011-05-05 17:21:18 CEST