]> git.proxmox.com Git - libgit2.git/blob - tests/status/status_helpers.h
New upstream version 1.4.3+dfsg.1
[libgit2.git] / tests / status / status_helpers.h
1 #ifndef INCLUDE_cl_status_helpers_h__
2 #define INCLUDE_cl_status_helpers_h__
3
4 typedef struct {
5 int wrong_status_flags_count;
6 int wrong_sorted_path;
7 int entry_count;
8 const unsigned int* expected_statuses;
9 const char** expected_paths;
10 int expected_entry_count;
11 const char *file;
12 const char *func;
13 int line;
14 bool debug;
15 } status_entry_counts;
16
17 #define status_counts_init(counts, paths, statuses) do { \
18 memset(&(counts), 0, sizeof(counts)); \
19 (counts).expected_statuses = (statuses); \
20 (counts).expected_paths = (paths); \
21 (counts).file = __FILE__; \
22 (counts).func = __func__; \
23 (counts).line = __LINE__; \
24 } while (0)
25
26 /* cb_status__normal takes payload of "status_entry_counts *" */
27
28 extern int cb_status__normal(
29 const char *path, unsigned int status_flags, void *payload);
30
31
32 /* cb_status__count takes payload of "int *" */
33
34 extern int cb_status__count(const char *p, unsigned int s, void *payload);
35
36
37 typedef struct {
38 int count;
39 unsigned int status;
40 bool debug;
41 } status_entry_single;
42
43 /* cb_status__single takes payload of "status_entry_single *" */
44
45 extern int cb_status__single(const char *p, unsigned int s, void *payload);
46
47 /* cb_status__print takes optional payload of "int *" */
48
49 extern int cb_status__print(const char *p, unsigned int s, void *payload);
50
51 #endif