2
* Drizzle Client & Protocol Library
4
* Copyright (C) 2008 Eric Day (eday@oddments.org)
7
* Use and distribution licensed under the BSD license. See
8
* the COPYING file in this directory for full text.
13
* @brief drizzle_result_st tests
16
#include <libdrizzle-1.0/t/common.h>
26
drizzle_result_st *result;
27
drizzle_result_st result_buffer;
28
drizzle_result_st *clone;
30
printf("sizeof(drizzle_result_st) = %zu\n", sizeof(drizzle_result_st));
32
if ((drizzle= drizzle_create(NULL)) == NULL)
33
drizzle_test_error("drizzle_create");
35
if ((con= drizzle_con_create(drizzle, NULL)) == NULL)
36
drizzle_test_error("drizzle_con_create");
38
if ((result= drizzle_result_create(con, &result_buffer)) == NULL)
39
drizzle_test_error("drizzle_result_create");
40
drizzle_result_free(result);
42
if ((result= drizzle_result_create(con, NULL)) == NULL)
43
drizzle_test_error("drizzle_result_create");
45
if ((clone= drizzle_result_clone(con, NULL, result)) == NULL)
46
drizzle_test_error("drizzle_result_clone");
47
drizzle_result_free(clone);
49
drizzle_result_set_info(result, "simple test");
51
if (strcmp(drizzle_result_info(result), "simple test"))
52
drizzle_test_error("drizzle_result_info");
54
drizzle_result_free(result);
55
drizzle_con_free(con);
56
drizzle_free(drizzle);