Skip to content

Commit

Permalink
unit test follow new grn_table_add().
Browse files Browse the repository at this point in the history
* test/unit/core/test-inverted-index.c: follow grn_table_add().
* test/unit/core/test-table.c: follow grn_table_add().
  • Loading branch information
daijiro committed May 12, 2009
1 parent 6417c65 commit ec42dd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions test/unit/core/test-inverted-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ set_index_source(grn_obj *index, grn_obj *source)
static void
insert_and_search(grn_obj *users, grn_obj *items, grn_obj *checks, grn_obj *checked)
{
grn_id user1 = grn_table_add(context, users);
grn_id user2 = grn_table_add(context, users);
grn_id item = grn_table_add(context, items);
grn_id user1 = grn_table_add(context, users, NULL, 0, NULL);
grn_id user2 = grn_table_add(context, users, NULL, 0, NULL);
grn_id item = grn_table_add(context, items, NULL, 0, NULL);
grn_obj value, *res;
GRN_TEXT_INIT(&value);
res = grn_table_create(context, NULL, 0, NULL, GRN_TABLE_HASH_KEY, users, 0);
Expand Down Expand Up @@ -595,8 +595,8 @@ test_int_index(void)
int32_t key = 1;
grn_search_flags f = GRN_TABLE_ADD;
grn_obj value, query, *res;
grn_id user1 = grn_table_add(context, users);
grn_id user2 = grn_table_add(context, users);
grn_id user1 = grn_table_add(context, users, NULL, 0, NULL);
grn_id user2 = grn_table_add(context, users, NULL, 0, NULL);
grn_id item = grn_table_lookup(context, items, &key, sizeof(int32_t), &f);
GRN_TEXT_INIT(&value);
GRN_TEXT_INIT(&query);
Expand Down
4 changes: 2 additions & 2 deletions test/unit/core/test-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test_array_set_data(void)
table = grn_table_create(&context, NULL, 0, NULL,
GRN_OBJ_TABLE_NO_KEY,
NULL, sizeof(value));
record_id = grn_table_add(&context, table);
record_id = grn_table_add(&context, table, NULL, 0, NULL);

record_value = grn_obj_open(&context, GRN_BULK, 0, 0);
grn_bulk_write(&context, record_value, value, sizeof(value));
Expand Down Expand Up @@ -143,7 +143,7 @@ test_temporary_table_add(gpointer data)
OBJECT("<shorttext>"),
sizeof(grn_id));
if ((flags & GRN_OBJ_TABLE_TYPE_MASK) == GRN_OBJ_TABLE_NO_KEY) {
grn_table_add(&context, table);
grn_table_add(&context, table, NULL, 0, NULL);
} else {
grn_search_flags flags = GRN_TABLE_ADD;
grn_table_lookup(&context, table, key, strlen(key), &flags);
Expand Down

0 comments on commit ec42dd2

Please sign in to comment.