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_column_st tests
16
#include "tests/common.h"
22
drizzle_result_st *result;
23
drizzle_column_st *column;
24
drizzle_column_st column_buffer;
26
printf("sizeof(drizzle_column_st) = %zu\n", sizeof(drizzle_column_st));
28
drizzle_test("drizzle_create");
29
if ((drizzle= drizzle_create(NULL)) == NULL)
30
drizzle_test_error("returned NULL");
32
drizzle_test("drizzle_con_create");
33
if ((con= drizzle_con_create(drizzle, NULL)) == NULL)
34
drizzle_test_error("returned NULL");
36
drizzle_test("drizzle_result_create");
37
if ((result= drizzle_result_create(con, NULL)) == NULL)
38
drizzle_test_error("returned NULL");
40
drizzle_test("drizzle_column_create buffer");
41
if ((column= drizzle_column_create(result, &column_buffer)) == NULL)
42
drizzle_test_error("returned NULL");
43
drizzle_column_free(column);
45
drizzle_test("drizzle_column_create");
46
if ((column= drizzle_column_create(result, NULL)) == NULL)
47
drizzle_test_error("returned NULL");
49
drizzle_test("drizzle_column_set_catalog");
50
drizzle_column_set_catalog(column, "simple test");
52
drizzle_test("drizzle_column_catalog");
53
if (strcmp(drizzle_column_catalog(column), "simple test"))
54
drizzle_test_error("does not match what was set");
56
drizzle_test("drizzle_column_free");
57
drizzle_column_free(column);
59
drizzle_test("drizzle_result_free");
60
drizzle_result_free(result);
62
drizzle_test("drizzle_con_free");
63
drizzle_con_free(con);
65
drizzle_test("drizzle_free");
66
drizzle_free(drizzle);