summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-05-21 00:01:35 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-05-21 00:01:35 +0200
commit0ac936a5cfe3f0b962eb1f6cfea0192107656117 (patch)
treeb2357287e03eeb1fd1e1917af59d87a14cbb7b93 /tests
parent8f308ea9181d203240cc929ec4942052419706b6 (diff)
downloadweechat-0ac936a5cfe3f0b962eb1f6cfea0192107656117.zip
core: return -1 in case of error in functions string_base16_decode and string_base64_decode
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/core/test-core-string.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/core/test-core-string.cpp b/tests/unit/core/test-core-string.cpp
index 24801e29c..21dc894be 100644
--- a/tests/unit/core/test-core-string.cpp
+++ b/tests/unit/core/test-core-string.cpp
@@ -1705,9 +1705,9 @@ TEST(CoreString, Base16)
}
/* string_base16_decode */
- LONGS_EQUAL(0, string_base16_decode (NULL, NULL));
- LONGS_EQUAL(0, string_base16_decode (NULL, str));
- LONGS_EQUAL(0, string_base16_decode ("", NULL));
+ LONGS_EQUAL(-1, string_base16_decode (NULL, NULL));
+ LONGS_EQUAL(-1, string_base16_decode (NULL, str));
+ LONGS_EQUAL(-1, string_base16_decode ("", NULL));
LONGS_EQUAL(0, string_base16_decode ("", str));
for (i = 0; str_base16[i][0]; i++)
{
@@ -1828,9 +1828,9 @@ TEST(CoreString, Base64)
}
/* string_base64_decode */
- LONGS_EQUAL(0, string_base64_decode (NULL, NULL));
- LONGS_EQUAL(0, string_base64_decode (NULL, str));
- LONGS_EQUAL(0, string_base64_decode ("", NULL));
+ LONGS_EQUAL(-1, string_base64_decode (NULL, NULL));
+ LONGS_EQUAL(-1, string_base64_decode (NULL, str));
+ LONGS_EQUAL(-1, string_base64_decode ("", NULL));
LONGS_EQUAL(0, string_base64_decode ("", str));
for (i = 0; str_base64[i][0]; i++)
{