test: Add tests for isd_get_commercial_credit()
[libisds.git] / test / offline / isds_hash_free.c
blobe91fb58e2fb64528cb9a7939cea0a303989e5895
1 #include "../test.h"
2 #include "isds.h"
4 static int test_isds_hash_free(
5 struct isds_hash **hash) {
6 isds_hash_free(hash);
7 if (!hash) PASS_TEST;
9 if (*hash)
10 FAIL_TEST("isds_hash_free() did not null pointer");
12 PASS_TEST;
16 int main(int argc, char **argv) {
18 INIT_TEST("isds_hash_free()");
19 if (isds_init())
20 ABORT_UNIT("isds_init() failed");
22 struct isds_hash *hash = NULL;
23 TEST("NULL", test_isds_hash_free, NULL);
24 TEST("*NULL", test_isds_hash_free, &hash);
26 TEST_CALLOC(hash);
27 TEST("Empty structure", test_isds_hash_free, &hash);
29 TEST_CALLOC(hash);
30 TEST_FILL_STRING(hash->value);
31 TEST("Full structure", test_isds_hash_free, &hash);
33 isds_cleanup();
34 SUM_TEST();