void cut_setup(void) { const gchar *database_path; cut_set_fixture_data_dir(grn_test_get_base_dir(), "fixtures", "story", "taiyaki", NULL); remove_tmp_directory(); g_mkdir_with_parents(tmp_directory, 0700); context = g_new0(grn_ctx, 1); grn_ctx_init(context, 0); database_path = cut_build_path(tmp_directory, "database.groonga", NULL); database = grn_db_create(context, database_path, NULL); setup_values(); load_data(); shops = get("Shops"); location_index = get("Locations.shop"); result = grn_table_create(context, NULL, 0, NULL, GRN_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, shops, NULL); }
void cut_setup(void) { const gchar *database_path; cut_set_fixture_data_dir(grn_test_get_base_dir(), "fixtures", "story", "taiyaki", NULL); remove_tmp_directory(); g_mkdir_with_parents(tmp_directory, 0700); context = g_new0(grn_ctx, 1); grn_ctx_init(context, 0); database_path = cut_build_path(tmp_directory, "database.groonga", NULL); database = grn_db_create(context, database_path, NULL); assert_send_commands(cut_get_fixture_data_string("ddl.grn", NULL)); assert_send_command(cut_get_fixture_data_string("areas.grn", NULL)); assert_send_command(cut_get_fixture_data_string("categories.grn", NULL)); assert_send_command(cut_get_fixture_data_string("shops.grn", NULL)); assert_send_command(cut_get_fixture_data_string("synonyms.grn", NULL)); }
void cut_setup(void) { const gchar *database_path; cut_set_fixture_data_dir(grn_test_get_base_dir(), "fixtures", "geo", NULL); remove_tmp_directory(); g_mkdir_with_parents(tmp_directory, 0700); context = g_new0(grn_ctx, 1); grn_ctx_init(context, 0); database_path = cut_build_path(tmp_directory, "database.groonga", NULL); database = grn_db_create(context, database_path, NULL); load_data(); points = get("Points"); short_degree_column = get("Points.short_degree"); location_index_column = get("Locations.point"); result = grn_table_create(context, NULL, 0, NULL, GRN_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, points, NULL); }
void setup (void) { cut_set_fixture_data_dir(cut_get_source_directory(), "test", "fixtures", NULL); actual_attachments = NULL; }
void cut_setup(void) { gchar *table_path, *vgram_path; const gchar *type_name, *table_name; cut_set_fixture_data_dir(grn_test_get_base_dir(), "fixtures", "inverted-index", NULL); logger = setup_grn_logger(); expected_messages = NULL; record_ids = NULL; remove_tmp_directory(); g_mkdir_with_parents(tmp_directory, 0700); path = g_build_filename(tmp_directory, "inverted-index", NULL); context = g_new0(grn_ctx, 1); grn_test_assert(grn_ctx_init(context, GRN_CTX_USE_QL)); GRN_CTX_SET_ENCODING(context, GRN_ENC_UTF8); db = grn_db_create(context, NULL, NULL); grn_ctx_use(context, db); type_name = "name"; type = grn_type_create(context, type_name, strlen(type_name), GRN_OBJ_KEY_VAR_SIZE, TYPE_SIZE); table_name = "lexicon"; table_path = g_build_filename(tmp_directory, "lexicon-table", NULL); lexicon = grn_table_create(context, table_name, strlen(table_name), table_path, GRN_OBJ_PERSISTENT | GRN_OBJ_TABLE_PAT_KEY, type, NULL); grn_obj_set_info(context, lexicon, GRN_INFO_DEFAULT_TOKENIZER, grn_ctx_at(context, GRN_DB_BIGRAM)); g_free(table_path); vgram_path = g_build_filename(tmp_directory, "vgram", NULL); /* vgram = grn_vgram_create(vgram_path); */ g_free(vgram_path); inverted_index = NULL; }
void cut_setup (void) { pixbuf1 = NULL; pixbuf2 = NULL; expected_diff = NULL; actual_diff = NULL; cut_set_fixture_data_dir(cuttest_get_base_dir(), "fixtures", "pixbuf", NULL); }
void cut_setup (void) { const gchar *dir = g_getenv("BASE_DIR"); dir = dir ? dir : "."; cut_set_fixture_data_dir(dir, "fixtures", NULL); docset001_path = cut_take_string(cut_build_fixture_data_path("docset001.txt", NULL)); docset002_path = cut_take_string(cut_build_fixture_data_path("docset002.txt", NULL)); doc = NULL; docset = NULL; pool = NULL; }
/* ---- cutter setup/teardown ---- */ void cut_setup(void) { cut_set_fixture_data_dir(mb_test_get_fixtures_dir(), NULL); dummy_file = (char *) cut_build_fixture_path("1MB.sparse", NULL); freed_list = NULL; will_free_list = NULL; will_not_free_list = NULL; __free_hook = my_free_hook; aiom = NULL; iocb = NULL; cbpool = NULL; pseudo_io_queue = NULL; pseudo_io_queue_len = 0; // set dummy execution file name in argv for parse_args bzero(argv, sizeof(argv)); argv[0] = "./dummy"; }
void setup (void) { document = NULL; expected_font_names = NULL; actual_font_names = NULL; expected_action_types = NULL; actual_action_types = NULL; cut_set_fixture_data_dir (poppler_test_get_base_dir (), "fixtures", "pdf", NULL); tmp_base_dir = g_build_filename (poppler_test_get_base_dir (), "tmp", NULL); cut_remove_path (tmp_base_dir, NULL); tmp_dir = g_build_filename (tmp_base_dir, "document", NULL); g_mkdir_with_parents (tmp_dir, 0755); }