1*7f2fe78bSCy Schubert #include "test_ccapi_constants.h"
2*7f2fe78bSCy Schubert #include "test_ccapi_globals.h"
3*7f2fe78bSCy Schubert #include "test_ccapi_check.h"
4*7f2fe78bSCy Schubert
check_constants(void)5*7f2fe78bSCy Schubert int check_constants(void) {
6*7f2fe78bSCy Schubert BEGIN_TEST("constants");
7*7f2fe78bSCy Schubert /* API versions */
8*7f2fe78bSCy Schubert
9*7f2fe78bSCy Schubert check_int(ccapi_version_2, 2);
10*7f2fe78bSCy Schubert check_int(ccapi_version_3, 3);
11*7f2fe78bSCy Schubert check_int(ccapi_version_4, 4);
12*7f2fe78bSCy Schubert check_int(ccapi_version_5, 5);
13*7f2fe78bSCy Schubert check_int(ccapi_version_6, 6);
14*7f2fe78bSCy Schubert
15*7f2fe78bSCy Schubert /* Errors */
16*7f2fe78bSCy Schubert
17*7f2fe78bSCy Schubert check_int(ccNoError , 0 ); // 0
18*7f2fe78bSCy Schubert check_int(ccIteratorEnd , 201); // 201
19*7f2fe78bSCy Schubert check_int(ccErrBadParam , 202); // 202
20*7f2fe78bSCy Schubert check_int(ccErrNoMem , 203); // 203
21*7f2fe78bSCy Schubert check_int(ccErrInvalidContext , 204); // 204
22*7f2fe78bSCy Schubert check_int(ccErrInvalidCCache , 205); // 205
23*7f2fe78bSCy Schubert check_int(ccErrInvalidString , 206); // 206
24*7f2fe78bSCy Schubert check_int(ccErrInvalidCredentials , 207); // 207
25*7f2fe78bSCy Schubert check_int(ccErrInvalidCCacheIterator , 208); // 208
26*7f2fe78bSCy Schubert check_int(ccErrInvalidCredentialsIterator , 209); // 209
27*7f2fe78bSCy Schubert check_int(ccErrInvalidLock , 210); // 210
28*7f2fe78bSCy Schubert check_int(ccErrBadName , 211); // 211
29*7f2fe78bSCy Schubert check_int(ccErrBadCredentialsVersion , 212); // 212
30*7f2fe78bSCy Schubert check_int(ccErrBadAPIVersion , 213); // 213
31*7f2fe78bSCy Schubert check_int(ccErrContextLocked , 214); // 214
32*7f2fe78bSCy Schubert check_int(ccErrContextUnlocked , 215); // 215
33*7f2fe78bSCy Schubert check_int(ccErrCCacheLocked , 216); // 216
34*7f2fe78bSCy Schubert check_int(ccErrCCacheUnlocked , 217); // 217
35*7f2fe78bSCy Schubert check_int(ccErrBadLockType , 218); // 218
36*7f2fe78bSCy Schubert check_int(ccErrNeverDefault , 219); // 219
37*7f2fe78bSCy Schubert check_int(ccErrCredentialsNotFound , 220); // 220
38*7f2fe78bSCy Schubert check_int(ccErrCCacheNotFound , 221); // 221
39*7f2fe78bSCy Schubert check_int(ccErrContextNotFound , 222); // 222
40*7f2fe78bSCy Schubert check_int(ccErrServerUnavailable , 223); // 223
41*7f2fe78bSCy Schubert check_int(ccErrServerInsecure , 224); // 224
42*7f2fe78bSCy Schubert check_int(ccErrServerCantBecomeUID , 225); // 225
43*7f2fe78bSCy Schubert check_int(ccErrTimeOffsetNotSet , 226); // 226
44*7f2fe78bSCy Schubert check_int(ccErrBadInternalMessage , 227); // 227
45*7f2fe78bSCy Schubert check_int(ccErrNotImplemented , 228); // 228
46*7f2fe78bSCy Schubert
47*7f2fe78bSCy Schubert /* Credentials versions */
48*7f2fe78bSCy Schubert
49*7f2fe78bSCy Schubert check_int(cc_credentials_v5, 2);
50*7f2fe78bSCy Schubert
51*7f2fe78bSCy Schubert /* Lock types */
52*7f2fe78bSCy Schubert
53*7f2fe78bSCy Schubert check_int(cc_lock_read, 0);
54*7f2fe78bSCy Schubert check_int(cc_lock_write, 1);
55*7f2fe78bSCy Schubert check_int(cc_lock_upgrade, 2);
56*7f2fe78bSCy Schubert check_int(cc_lock_downgrade, 3);
57*7f2fe78bSCy Schubert
58*7f2fe78bSCy Schubert /* Locking Modes */
59*7f2fe78bSCy Schubert
60*7f2fe78bSCy Schubert check_int(cc_lock_noblock, 0);
61*7f2fe78bSCy Schubert check_int(cc_lock_block, 1);
62*7f2fe78bSCy Schubert
63*7f2fe78bSCy Schubert END_TEST_AND_RETURN
64*7f2fe78bSCy Schubert }
65