本文整理汇总了C++中remove_tmp_directory函数的典型用法代码示例。如果您正苦于以下问题:C++ remove_tmp_directory函数的具体用法?C++ remove_tmp_directory怎么用?C++ remove_tmp_directory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了remove_tmp_directory函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: cut_teardown
void
cut_teardown(void)
{
if (context) {
inverted_index_free();
if (path)
grn_ii_remove(context, path);
grn_ctx_fin(context);
g_free(context);
}
/*
if (vgram)
grn_vgram_close(vgram);
*/
if (path) {
g_free(path);
path = NULL;
}
remove_tmp_directory();
record_ids_free();
expected_messages_free();
teardown_grn_logger(logger);
}
开发者ID:kazu,项目名称:groonga,代码行数:29,代码来源:test-inverted-index.c
示例2: cut_setup
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);
}
开发者ID:zunda,项目名称:groonga,代码行数:31,代码来源:test-geo-in-rectangle-border.c
示例3: cut_setup
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);
}
开发者ID:darashi,项目名称:groonga,代码行数:32,代码来源:test-geo-in-rectangle.c
示例4: cut_setup
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));
}
开发者ID:mmmaru777,项目名称:groonga,代码行数:26,代码来源:test-taiyaki.c
示例5: cut_teardown
void
cut_teardown(void)
{
if (cursor) {
grn_obj_unlink(context, cursor);
}
if (result) {
grn_obj_unlink(context, result);
}
if (column) {
grn_obj_unlink(context, column);
}
if (table) {
grn_obj_unlink(context, table);
}
grn_obj_close(context, database);
grn_ctx_fin(context);
g_free(context);
remove_tmp_directory();
}
开发者ID:darashi,项目名称:groonga,代码行数:25,代码来源:test-table-sort-geo.c
示例6: test_expression_lifetime_over_database
void
test_expression_lifetime_over_database(void)
{
const gchar *path;
gint i, n_tries = 100;
grn_obj *expression;
cut_omit("will be SEGVed.");
path = cut_build_path(tmp_directory, "database.groonga", NULL);
for (i = 0; i < n_tries; i++) {
gint j, n_records = 100;
const gchar *query;
grn_obj *table, *variable;
grn_obj default_column;
database = grn_db_create(context, path, NULL);
grn_test_assert_context(context);
assert_send_command("table_create Sites 0 ShortText");
assert_send_command("column_create Sites point COLUMN_SCALAR Int32");
for (j = 0; j < n_records; j++) {
gchar *command;
command = g_strdup_printf("load '"
"[[\"_key\", \"point\"],"
"[\"http://groonga.org/version/%d\",%d]]' "
"Sites",
j, j);
assert_send_command(command);
g_free(command);
}
table = get_object("Sites");
GRN_EXPR_CREATE_FOR_QUERY(context, table, expression, variable);
grn_obj_unlink(context, table);
GRN_TEXT_INIT(&default_column, 0);
GRN_TEXT_PUTS(context, &default_column, "point");
query = "point:50";
grn_expr_parse(context, expression,
query, strlen(query),
&default_column,
GRN_OP_MATCH, GRN_OP_AND,
GRN_EXPR_SYNTAX_QUERY | GRN_EXPR_ALLOW_COLUMN);
grn_test_assert_context(context);
grn_obj_unlink(context, &default_column);
grn_expr_compile(context, expression);
grn_obj_remove(context, database);
database = NULL;
remove_tmp_directory();
g_mkdir_with_parents(tmp_directory, 0700);
}
grn_ctx_fin(context);
g_free(context);
context = NULL;
}
开发者ID:ryoqun,项目名称:groonga,代码行数:59,代码来源:test-database.c
示例7: cut_teardown
void
cut_teardown(void)
{
grn_obj_close(context, database);
grn_ctx_fin(context);
g_free(context);
remove_tmp_directory();
}
开发者ID:WEIC-DEV,项目名称:groonga,代码行数:9,代码来源:test-function-edit-distance.c
示例8: cut_teardown
void
cut_teardown(void)
{
teardown_database();
teardown_grn_logger(logger);
remove_tmp_directory();
}
开发者ID:bossato,项目名称:groonga,代码行数:9,代码来源:test-view.c
示例9: cut_teardown
void
cut_teardown(void)
{
if (context) {
grn_obj_unlink(context, database);
grn_ctx_fin(context);
g_free(context);
}
remove_tmp_directory();
}
开发者ID:AkioKanno,项目名称:groonga,代码行数:11,代码来源:test-command-select-query.c
示例10: cut_setup
void
cut_setup(void)
{
remove_tmp_directory();
g_mkdir_with_parents(tmp_directory, 0700);
context = g_new0(grn_ctx, 1);
grn_ctx_init(context, 0);
ja = grn_ja_create(context, NULL, 65536, 0);
vector = grn_obj_open(context, GRN_BULK, GRN_OBJ_VECTOR, GRN_DB_VOID);
}
开发者ID:WEIC-DEV,项目名称:groonga,代码行数:11,代码来源:test-store-ja.c
示例11: cut_setup
void
cut_setup(void)
{
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);
}
开发者ID:fusuian,项目名称:groonga,代码行数:12,代码来源:test-command-column-create.c
示例12: cut_setup
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;
}
开发者ID:kazu,项目名称:groonga,代码行数:52,代码来源:test-inverted-index.c
示例13: cut_teardown
void
cut_teardown(void)
{
teardown_values();
grn_obj_unlink(context, result);
grn_obj_unlink(context, location_index);
grn_obj_close(context, database);
grn_ctx_fin(context);
g_free(context);
remove_tmp_directory();
}
开发者ID:darashi,项目名称:groonga,代码行数:13,代码来源:test-geo-in-rectangle.c
示例14: cut_teardown
void
cut_teardown(void)
{
grn_obj_unlink(context, result);
grn_obj_unlink(context, location_index_column);
grn_obj_unlink(context, short_degree_column);
grn_obj_unlink(context, points);
grn_obj_close(context, database);
grn_ctx_fin(context);
g_free(context);
remove_tmp_directory();
}
开发者ID:zunda,项目名称:groonga,代码行数:13,代码来源:test-geo-in-rectangle-border.c
示例15: cut_setup
void
cut_setup(void)
{
remove_tmp_directory();
g_mkdir_with_parents(tmp_directory, 0700);
context = g_new0(grn_ctx, 1);
grn_ctx_init(context, 0);
database = NULL;
context2 = g_new0(grn_ctx, 1);
grn_ctx_init(context2, 0);
database2 = NULL;
}
开发者ID:ryoqun,项目名称:groonga,代码行数:14,代码来源:test-database.c
示例16: cut_setup
void
cut_setup(void)
{
remove_tmp_directory();
g_mkdir_with_parents(tmp_directory, 0700);
context = NULL;
logger = setup_grn_logger();
context = g_new0(grn_ctx, 1);
grn_ctx_init(context, 0);
database = grn_db_create(context,
cut_build_path(tmp_directory, "table.db", NULL),
NULL);
}
开发者ID:temita,项目名称:groonga,代码行数:16,代码来源:test-table.c
示例17: cut_teardown
void
cut_teardown(void)
{
if (vector) {
grn_obj_unlink(context, vector);
}
if (ja) {
grn_ja_close(context, ja);
}
if (context) {
grn_ctx_fin(context);
g_free(context);
}
remove_tmp_directory();
}
开发者ID:WEIC-DEV,项目名称:groonga,代码行数:18,代码来源:test-store-ja.c
示例18: cut_setup
void
cut_setup(void)
{
const gchar *database_path;
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);
table = NULL;
column = NULL;
result = NULL;
cursor = NULL;
}
开发者ID:darashi,项目名称:groonga,代码行数:18,代码来源:test-table-sort-geo.c
示例19: cut_setup
void
cut_setup(void)
{
const gchar *database_path;
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_command("table_create Test TABLE_PAT_KEY ShortText");
assert_send_command("column_create Test name COLUMN_SCALAR Text");
table = get_object("Test");
}
开发者ID:ryoqun,项目名称:groonga,代码行数:18,代码来源:test-table-sort-key-from-str.c
示例20: test_scalar_index
void
test_scalar_index(void)
{
gchar *db_path;
const gchar *name;
grn_obj *users, *items, *checks, *checked;
grn_obj_close(context, db);
remove_tmp_directory();
g_mkdir_with_parents(tmp_directory, 0700);
db_path = g_build_filename(tmp_directory, "inverted-index", NULL);
db = grn_db_create(context, db_path, NULL);
g_free(db_path);
name = "users";
users = grn_table_create(context, name, strlen(name), NULL,
GRN_OBJ_TABLE_NO_KEY|GRN_OBJ_PERSISTENT, NULL, 0);
cut_assert_not_null(users);
name = "items";
items = grn_table_create(context, name, strlen(name), NULL,
GRN_OBJ_TABLE_NO_KEY|GRN_OBJ_PERSISTENT, NULL, 0);
cut_assert_not_null(items);
name = "checks";
checks = grn_column_create(context, users, name, strlen(name), NULL,
GRN_OBJ_COLUMN_SCALAR|GRN_OBJ_PERSISTENT, items);
cut_assert_not_null(checks);
name = "checked";
checked = grn_column_create(context, items, name, strlen(name), NULL,
GRN_OBJ_COLUMN_INDEX|GRN_OBJ_PERSISTENT, users);
cut_assert_not_null(checked);
grn_test_assert(set_index_source(checked, checks));
insert_and_search(users, items, checks, checked);
grn_obj_close(context, checks);
grn_obj_close(context, checked);
grn_obj_close(context, items);
grn_obj_close(context, users);
}
开发者ID:XLPE,项目名称:groonga,代码行数:44,代码来源:test-inverted-index.c
注:本文中的remove_tmp_directory函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论