aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2013-02-11 13:43:20 +0000
committerGeorge Kadianakis <desnacked@riseup.net>2013-02-11 18:07:26 +0000
commit266f8cddd87f8cf507e094725b3f6028bb8d803b (patch)
tree5d903eb81b90ccfe4b5356e8623d83b53ec434d0 /src/test/test_util.c
parentb5dceab1751dfa12b27b3042a49d90e0b02c2e0c (diff)
downloadtor-266f8cddd87f8cf507e094725b3f6028bb8d803b.tar.gz
tor-266f8cddd87f8cf507e094725b3f6028bb8d803b.zip
Refactoring to make parse_bridge_line() unittestable.
- Make parse_bridge_line() return a struct. - Make bridge_add_from_config() accept a struct. - Make string_is_key_value() less hysterical.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index a307a79c80..606f8316a0 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -838,17 +838,17 @@ static void
test_util_string_is_key_value(void *ptr)
{
(void)ptr;
- test_assert(string_is_key_value("key=value"));
- test_assert(string_is_key_value("k=v"));
- test_assert(string_is_key_value("key="));
- test_assert(string_is_key_value("x="));
- test_assert(string_is_key_value("xx="));
- test_assert(!string_is_key_value("=value"));
- test_assert(!string_is_key_value("=x"));
- test_assert(!string_is_key_value("="));
+ test_assert(string_is_key_value(LOG_WARN, "key=value"));
+ test_assert(string_is_key_value(LOG_WARN, "k=v"));
+ test_assert(string_is_key_value(LOG_WARN, "key="));
+ test_assert(string_is_key_value(LOG_WARN, "x="));
+ test_assert(string_is_key_value(LOG_WARN, "xx="));
+ test_assert(!string_is_key_value(LOG_WARN, "=value"));
+ test_assert(!string_is_key_value(LOG_WARN, "=x"));
+ test_assert(!string_is_key_value(LOG_WARN, "="));
/* ??? */
- /* test_assert(!string_is_key_value("===")); */
+ /* test_assert(!string_is_key_value(LOG_WARN, "===")); */
done:
;
}