#include <apr_pools.h>
#include "svn_delta.h"
#include "svn_path.h"
#include "svn_types.h"
#include "svn_error.h"
#include "svn_string.h"
Go to the source code of this file.
Data Structures | |
struct | svn_test_descriptor_t |
Each test gets a test descriptor, holding the function and other associated data. More... | |
Defines | |
#define | SVN_TEST_NULL {NULL, 0} |
A null initializer for the test descriptor. | |
#define | SVN_TEST_PASS(func) {func, 0} |
Initializer for PASS tests. | |
#define | SVN_TEST_XFAIL(func) {func, 1} |
Initializer for XFAIL tests. | |
Typedefs | |
typedef svn_error_t *(* | svn_test_driver_t )(const char **msg, svn_boolean_t msg_only, apr_pool_t *pool) |
Prototype for test driver functions. | |
Functions | |
apr_uint32_t | svn_test_rand (apr_uint32_t *seed) |
Return a pseudo-random number based on seed, and modify seed. | |
void | svn_test_add_dir_cleanup (const char *path) |
Add path to the test cleanup list. | |
svn_error_t * | svn_test_get_editor (const svn_delta_editor_t **editor, void **edit_baton, const char *editor_name, svn_stream_t *out_stream, int indentation, svn_boolean_t verbose, const char *path, apr_pool_t *pool) |
Set *editor and *edit_baton to an editor that prints its arguments to out_stream. | |
Variables | |
svn_test_descriptor_t | test_funcs [] |
All Subversion test programs include an array of svn_test_descriptor_t's (all of our sub-tests) that begins and ends with a SVN_TEST_NULL entry. |
Definition in file svn_test.h.
|
Set *editor and *edit_baton to an editor that prints its arguments to out_stream. The edit starts at path, that is, path will be prepended to the appropriate paths in the output. Allocate the editor in pool. editor_name is a name for the editor, a string that will be prepended to the editor output as shown below. editor_name may be the empty string, but it may not be null.
verbose is a flag for specifying whether or not your want all the nitty gritty details displayed. When verbose is indentation is the number of spaces to indent by at each level; use 0 for no indentation. The indent level is always the same for a given call (i.e, stack frame). SOME EXAMPLES
With an indentation of 3, editor name of "COMMIT-TEST" and with verbose =
[COMMIT-TEST] open_root (wc) base_revision: 1 [COMMIT-TEST] open_directory (wc/A) parent: wc base_revision: 1 [COMMIT-TEST] delete_entry (wc/A/B) [COMMIT-TEST] open_file (wc/A/mu) parent: wc/A base_revision: 1 [COMMIT-TEST] change_file_prop (wc/A/mu) name: foo value: bar [COMMIT-TEST] close_file (wc/A/mu) [COMMIT-TEST] close_directory (wc/A) [COMMIT-TEST] add_file (wc/zeta) parent: wc copyfrom_path: copyfrom_revision: 0 [COMMIT-TEST] open_file (wc/iota) parent: wc base_revision: 1 [COMMIT-TEST] close_directory (wc) [COMMIT-TEST] apply_textdelta (wc/iota) [COMMIT-TEST] window_handler (2 ops) (1) new text: length 11 (2) source text: offset 0, length 0 [COMMIT-TEST] window_handler (EOT) [COMMIT-TEST] close_file (wc/iota) [COMMIT-TEST] apply_textdelta (wc/zeta) [COMMIT-TEST] window_handler (1 ops) (1) new text: length 11 [COMMIT-TEST] window_handler (EOT) [COMMIT-TEST] close_file (wc/zeta) [COMMIT-TEST] close_edit
The same example as above, but with verbose =
[COMMIT-TEST] open_root (wc) [COMMIT-TEST] open_directory (wc/A) [COMMIT-TEST] delete_entry (wc/A/B) [COMMIT-TEST] open_file (wc/A/mu) [COMMIT-TEST] change_file_prop (wc/A/mu) [COMMIT-TEST] close_file (wc/A/mu) [COMMIT-TEST] close_directory (wc/A) [COMMIT-TEST] add_file (wc/zeta) [COMMIT-TEST] open_file (wc/iota) [COMMIT-TEST] close_directory (wc) [COMMIT-TEST] apply_textdelta (wc/iota) [COMMIT-TEST] close_file (wc/iota) [COMMIT-TEST] apply_textdelta (wc/zeta) [COMMIT-TEST] close_file (wc/zeta) [COMMIT-TEST] close_edit This is implemented in tests/libsvn_test_editor.la |
|
Return a pseudo-random number based on seed, and modify seed.
This is a "good" pseudo-random number generator, intended to replace all those "bad" |