Navigation Menu

Skip to content

Commit

Permalink
add debug log to test codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikdttr committed Jun 30, 2009
1 parent 8105135 commit 4501bb4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/unit/test-driver.c
Expand Up @@ -3,6 +3,9 @@
#include <glib/gstdio.h>
#include "driver.h"

#define TEST_ENTER do { GRN_LOG(ctx, GRN_LOG_DEBUG, \
"%s", __FUNCTION__);} while(0)

static gchar *base_directory;
static gchar *tmp_directory;
static grn_ctx *ctx;
Expand Down Expand Up @@ -39,11 +42,13 @@ void cut_teardown()

void test_mrn_flush_logs()
{
TEST_ENTER;
cut_assert_equal_int(0, mrn_flush_logs(ctx));
}

void test_mrn_hash_put()
{
TEST_ENTER;
const char *key1 = "aa";
const char *key2 = "bbb";
const char *key3 = "cccc";
Expand All @@ -64,6 +69,7 @@ void test_mrn_hash_put()

void test_mrn_hash_get()
{
TEST_ENTER;
const char *key1 = "aa";
const char *key2 = "bbb";
const char *key3 = "cccc";
Expand Down Expand Up @@ -96,6 +102,7 @@ void test_mrn_hash_get()

void test_mrn_hash_remove()
{
TEST_ENTER;
const char *key1 = "aa";
const char *key2 = "bbb";
const char *key3 = "cccc";
Expand Down Expand Up @@ -125,6 +132,7 @@ void test_mrn_hash_remove()

void test_mrn_init_create_info()
{
TEST_ENTER;
uint n_columns = 8, i;
mrn_create_info *info;
info = mrn_init_create_info(ctx, n_columns);
Expand All @@ -145,13 +153,15 @@ void test_mrn_init_create_info()

void test_mrn_deinit_create_info()
{
TEST_ENTER;
mrn_create_info *info = mrn_init_create_info(ctx, 8);
cut_assert_not_null(info);
cut_assert_equal_int(0, mrn_deinit_create_info(ctx, info));
}

void test_mrn_create()
{
TEST_ENTER;
grn_obj *obj,*obj2;

mrn_create_info *info = mrn_init_create_info(ctx, 2);
Expand Down

0 comments on commit 4501bb4

Please sign in to comment.