1 #include <ccan/tdb2/tdb.c>
2 #include <ccan/tdb2/free.c>
3 #include <ccan/tdb2/lock.c>
4 #include <ccan/tdb2/io.c>
5 #include <ccan/tdb2/hash.c>
6 #include <ccan/tdb2/check.c>
7 #include <ccan/tdb2/transaction.c>
8 #include <ccan/tap/tap.h>
10 int main(int argc, char *argv[])
13 plan_tests(TDB_ERR_RDONLY*-1 + 2);
15 for (err = TDB_SUCCESS; err >= TDB_ERR_RDONLY; err--) {
18 ok1(!strcmp(tdb_errorstr(err),
22 ok1(!strcmp(tdb_errorstr(err),
26 ok1(!strcmp(tdb_errorstr(err),
30 ok1(!strcmp(tdb_errorstr(err),
34 ok1(!strcmp(tdb_errorstr(err),
38 ok1(!strcmp(tdb_errorstr(err),
39 "Invalid parameter"));
42 ok1(!strcmp(tdb_errorstr(err),
43 "Record does not exist"));
46 ok1(!strcmp(tdb_errorstr(err),
47 "write not permitted"));
50 ok1(!strcmp(tdb_errorstr(err),
55 ok1(!strcmp(tdb_errorstr(err), "Invalid error code"));