X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Ftests%2Ftest_silcstrutil.c;h=33bfc6215133047e8422d36c7704d152ab58576b;hp=a728dfd5f16c5f2606cf61357417c81e09835835;hb=a788ad407a51e84cfd41fedc6c053e62283ea2d7;hpb=72c2de619079457f7a68100eb13385275a424a23 diff --git a/lib/silcutil/tests/test_silcstrutil.c b/lib/silcutil/tests/test_silcstrutil.c index a728dfd5..33bfc621 100644 --- a/lib/silcutil/tests/test_silcstrutil.c +++ b/lib/silcutil/tests/test_silcstrutil.c @@ -1,7 +1,7 @@ /* UTF-8 decoding tests */ /* Other string util tests too */ -#include "silc.h" +#include "silcruntime.h" #define utf8fail(n, data, len) \ const unsigned char u##n[] = (data); \ @@ -121,7 +121,7 @@ int main(int argc, char **argv) /* To UTF-8 */ l = silc_utf8_encoded_len(s3, strlen(s3), SILC_STRING_LDAP_DN); if (!l) - goto err; + goto err; s4 = silc_calloc(l + 1, sizeof(*s4)); silc_utf8_encode(s3, strlen(s3), SILC_STRING_LDAP_DN, s4, l); SILC_LOG_DEBUG(("utf8 = %s", s4)); @@ -139,13 +139,13 @@ int main(int argc, char **argv) s2 = "PÄIVÄÄ VUAN YRJÖ"; l = silc_utf8_encoded_len(s1, strlen(s1), SILC_STRING_LOCALE); if (!l) - goto err; + goto err; s3 = silc_calloc(l + 1, sizeof(*s3)); silc_utf8_encode(s1, strlen(s1), SILC_STRING_LOCALE, s3, l); l = silc_utf8_encoded_len(s2, strlen(s2), SILC_STRING_LOCALE); if (!l) - goto err; + goto err; s4 = silc_calloc(l + 1, sizeof(*s4)); silc_utf8_encode(s2, strlen(s2), SILC_STRING_LOCALE, s4, l); @@ -192,5 +192,5 @@ int main(int argc, char **argv) SILC_LOG_DEBUG(("Testing was %s", success ? "SUCCESS" : "FAILURE")); fprintf(stderr, "Testing was %s\n", success ? "SUCCESS" : "FAILURE"); - return success; + return !success; }