Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Functions
test-hash.c File Reference
#include <math.h>
#include "test-hash.h"
Include dependency graph for test-hash.c:

Go to the source code of this file.

Data Structures

struct  _grn_test_data

Macros

#define put_sample_entry()
#define cut_assert_delete_by_id()
#define cut_assert_delete(key)

Typedefs

typedef struct _grn_test_data grn_test_data
typedef void(* increment_key_func )(grn_test_data *test_data)

Functions

void data_create (void)
void test_create (gconstpointer data)
void data_open (void)
void test_open (gconstpointer data)
void test_open_without_path (void)
void test_open_tiny_hash (void)
void data_lookup_add (void)
void test_lookup_add (gconstpointer data)
void data_delete_by_id (void)
void test_delete_by_id (gconstpointer data)
void data_delete (void)
void test_delete (gconstpointer data)
void data_get_key (void)
void test_get_key (gconstpointer data)
void data_get_value (void)
void test_get_value (gconstpointer data)
void data_set_value (void)
void test_set_value (gconstpointer data)
void data_set_value_with_null_value (void)
void test_set_value_with_null_value (gconstpointer data)
void data_add_and_delete (void)
void test_add_and_delete (gconstpointer data)
void data_truncate (void)
void test_truncate (gconstpointer data)
void cut_startup (void)
void cut_shutdown (void)
void cut_setup (void)
void cut_teardown (void)

Macro Definition Documentation

#define cut_assert_delete (   key)
Value:
do \
{ \
const void *_key; \
\
_key = (key); \
\
flags = GRN_TABLE_ADD; \
cut_assert_lookup(_key, &flags); \
grn_test_assert(grn_hash_delete(context, hash, _key, key_size, NULL)); \
grn_test_assert_equal_rc(GRN_INVALID_ARGUMENT, \
hash, _key, key_size, NULL)); \
\
flags = 0; \
cut_assert_lookup_failed(_key, &flags); \
} while (0)

Definition at line 403 of file test-hash.c.

#define cut_assert_delete_by_id ( )
Value:
do \
{ \
grn_hash_delete_by_id(context, hash, 0, NULL)); \
\
flags = 0; \
cut_assert_lookup(&sample_key, &flags); \
NULL, sample_id, NULL)); \
grn_test_assert(grn_hash_delete_by_id(context, hash, sample_id, NULL)); \
grn_test_assert_equal_rc(GRN_INVALID_ARGUMENT, \
hash, sample_id, NULL)); \
\
flags = 0; \
cut_assert_lookup_failed(&sample_key, &flags); \
} while (0)

Definition at line 359 of file test-hash.c.

#define put_sample_entry ( )
Value:
do \
{ \
\
flags = GRN_TABLE_ADD; \
cut_assert_lookup(&sample_key, &flags); \
cut_assert(flags & 1); \
sample_id = id; \
} while (0)

Definition at line 349 of file test-hash.c.

Typedef Documentation

typedef struct _grn_test_data grn_test_data

Definition at line 188 of file test-hash.c.

typedef void(* increment_key_func)(grn_test_data *test_data)

Definition at line 190 of file test-hash.c.

Function Documentation

void cut_setup ( void  )

Definition at line 63 of file test-hash.c.

void cut_shutdown ( void  )

Definition at line 57 of file test-hash.c.

void cut_startup ( void  )

Definition at line 51 of file test-hash.c.

void cut_teardown ( void  )

Definition at line 78 of file test-hash.c.

void data_add_and_delete ( void  )

Definition at line 560 of file test-hash.c.

void data_create ( void  )

Definition at line 126 of file test-hash.c.

void data_delete ( void  )
void data_delete_by_id ( void  )

Definition at line 384 of file test-hash.c.

void data_get_key ( void  )

Definition at line 444 of file test-hash.c.

void data_get_value ( void  )

Definition at line 474 of file test-hash.c.

void data_lookup_add ( void  )

Definition at line 328 of file test-hash.c.

void data_open ( void  )

Definition at line 144 of file test-hash.c.

void data_set_value ( void  )

Definition at line 506 of file test-hash.c.

void data_set_value_with_null_value ( void  )

Definition at line 533 of file test-hash.c.

void data_truncate ( void  )

Definition at line 593 of file test-hash.c.

void test_add_and_delete ( gconstpointer  data)

Definition at line 566 of file test-hash.c.

Here is the call graph for this function:

void test_create ( gconstpointer  data)

Definition at line 134 of file test-hash.c.

void test_delete ( gconstpointer  data)
void test_delete_by_id ( gconstpointer  data)

Definition at line 391 of file test-hash.c.

void test_get_key ( gconstpointer  data)

Definition at line 451 of file test-hash.c.

Here is the call graph for this function:

void test_get_value ( gconstpointer  data)

Definition at line 481 of file test-hash.c.

Here is the call graph for this function:

void test_lookup_add ( gconstpointer  data)

Definition at line 334 of file test-hash.c.

Here is the call graph for this function:

void test_open ( gconstpointer  data)

Definition at line 152 of file test-hash.c.

void test_open_tiny_hash ( void  )

Definition at line 180 of file test-hash.c.

void test_open_without_path ( void  )

Definition at line 163 of file test-hash.c.

Here is the call graph for this function:

void test_set_value ( gconstpointer  data)

Definition at line 513 of file test-hash.c.

Here is the call graph for this function:

void test_set_value_with_null_value ( gconstpointer  data)

Definition at line 540 of file test-hash.c.

Here is the call graph for this function:

void test_truncate ( gconstpointer  data)

Definition at line 599 of file test-hash.c.

Here is the call graph for this function: