aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-29 17:02:49 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-29 17:03:24 +0000
commitd2150fc165e99bb8d6a7411bffee6fd7d36d4763 (patch)
treefc4c6449d441835e860666e942fa6a08dec3aca1 /test
parent26b07297ed8936879d09ac113f84aa660f133901 (diff)
downloadrspamd-d2150fc165e99bb8d6a7411bffee6fd7d36d4763.tar.gz
rspamd-d2150fc165e99bb8d6a7411bffee6fd7d36d4763.zip
Refactor function names.
Diffstat (limited to 'test')
-rw-r--r--test/rspamd_fuzzy_test.c24
-rw-r--r--test/rspamd_test_suite.c2
2 files changed, 13 insertions, 13 deletions
diff --git a/test/rspamd_fuzzy_test.c b/test/rspamd_fuzzy_test.c
index 7bee03164..b1f1f5dcd 100644
--- a/test/rspamd_fuzzy_test.c
+++ b/test/rspamd_fuzzy_test.c
@@ -37,8 +37,8 @@ void
rspamd_fuzzy_test_func ()
{
rspamd_mempool_t *pool;
- fuzzy_hash_t *h1, *h2, *h3, *h4, *h5;
- f_str_t f1, f2, f3, f4, f5;
+ rspamd_fuzzy_t *h1, *h2, *h3, *h4, *h5;
+ rspamd_fstring_t f1, f2, f3, f4, f5;
int diff2;
pool = rspamd_mempool_new (1024);
@@ -53,17 +53,17 @@ rspamd_fuzzy_test_func ()
f5.begin = s5;
f5.len = strlen (s5);
- h1 = fuzzy_init (&f1, pool);
- h2 = fuzzy_init (&f2, pool);
- h3 = fuzzy_init (&f3, pool);
- h4 = fuzzy_init (&f4, pool);
- h5 = fuzzy_init (&f5, pool);
+ h1 = rspamd_fuzzy_init (&f1, pool);
+ h2 = rspamd_fuzzy_init (&f2, pool);
+ h3 = rspamd_fuzzy_init (&f3, pool);
+ h4 = rspamd_fuzzy_init (&f4, pool);
+ h5 = rspamd_fuzzy_init (&f5, pool);
- diff2 = fuzzy_compare_hashes (h2, h5);
- msg_debug ("rspamd_fuzzy_test_func: s1, s2 difference between strings is %d", fuzzy_compare_hashes (h1, h2));
- msg_debug ("rspamd_fuzzy_test_func: s1, s3 difference between strings is %d", fuzzy_compare_hashes (h1, h3));
- msg_debug ("rspamd_fuzzy_test_func: s3, s4 difference between strings is %d", fuzzy_compare_hashes (h3, h4));
- msg_debug ("rspamd_fuzzy_test_func: s2, s4 difference between strings is %d", fuzzy_compare_hashes (h2, h4));
+ diff2 = rspamd_fuzzy_compare (h2, h5);
+ msg_debug ("rspamd_fuzzy_test_func: s1, s2 difference between strings is %d", rspamd_fuzzy_compare (h1, h2));
+ msg_debug ("rspamd_fuzzy_test_func: s1, s3 difference between strings is %d", rspamd_fuzzy_compare (h1, h3));
+ msg_debug ("rspamd_fuzzy_test_func: s3, s4 difference between strings is %d", rspamd_fuzzy_compare (h3, h4));
+ msg_debug ("rspamd_fuzzy_test_func: s2, s4 difference between strings is %d", rspamd_fuzzy_compare (h2, h4));
msg_debug ("rspamd_fuzzy_test_func: s2, s5 difference between strings is %d", diff2);
/* Identical strings */
diff --git a/test/rspamd_test_suite.c b/test/rspamd_test_suite.c
index 1d78fac49..61fde350a 100644
--- a/test/rspamd_test_suite.c
+++ b/test/rspamd_test_suite.c
@@ -40,7 +40,7 @@ main (int argc, char **argv)
cfg->log_type = RSPAMD_LOG_CONSOLE;
/* First set logger to console logger */
rspamd_set_logger (cfg, g_quark_from_static_string("rspamd-test"), rspamd_main);
- (void)open_log (rspamd_main->logger);
+ (void)rspamd_log_open (rspamd_main->logger);
g_log_set_default_handler (rspamd_glib_log_function, rspamd_main->logger);
g_test_add_func ("/rspamd/mem_pool", rspamd_mem_pool_test_func);