diff options
Diffstat (limited to 'src/util/test_strings.c')
-rw-r--r-- | src/util/test_strings.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/test_strings.c b/src/util/test_strings.c index bc4169421..e5247ad91 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c | |||
@@ -39,6 +39,8 @@ main (int argc, char *argv[]) | |||
39 | const char *bc; | 39 | const char *bc; |
40 | struct GNUNET_TIME_Absolute at; | 40 | struct GNUNET_TIME_Absolute at; |
41 | struct GNUNET_TIME_Absolute atx; | 41 | struct GNUNET_TIME_Absolute atx; |
42 | struct GNUNET_TIME_Relative rt; | ||
43 | struct GNUNET_TIME_Relative rtx; | ||
42 | const char *hdir; | 44 | const char *hdir; |
43 | 45 | ||
44 | GNUNET_log_setup ("test_strings", "ERROR", NULL); | 46 | GNUNET_log_setup ("test_strings", "ERROR", NULL); |
@@ -109,6 +111,13 @@ main (int argc, char *argv[]) | |||
109 | b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "unknown"); | 111 | b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "unknown"); |
110 | GNUNET_log_skip (0, GNUNET_YES); | 112 | GNUNET_log_skip (0, GNUNET_YES); |
111 | WANT ("TEST", b); | 113 | WANT ("TEST", b); |
114 | |||
115 | GNUNET_assert (GNUNET_OK == | ||
116 | GNUNET_STRINGS_fancy_time_to_relative ("15m", &rt)); | ||
117 | GNUNET_assert (GNUNET_OK == | ||
118 | GNUNET_STRINGS_fancy_time_to_relative ("15 m", &rtx)); | ||
119 | GNUNET_assert (rt.rel_value == rtx.rel_value); | ||
120 | |||
112 | return 0; | 121 | return 0; |
113 | } | 122 | } |
114 | 123 | ||