summaryrefslogtreecommitdiff
path: root/jni/iodine/tests/base64.c
diff options
context:
space:
mode:
Diffstat (limited to 'jni/iodine/tests/base64.c')
-rw-r--r--jni/iodine/tests/base64.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/jni/iodine/tests/base64.c b/jni/iodine/tests/base64.c
index bd0e9ce..cd96d21 100644
--- a/jni/iodine/tests/base64.c
+++ b/jni/iodine/tests/base64.c
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2006-2009 Bjorn Andersson <flex@kryo.se>, Erik Ekman <yarrick@kryo.se>
+ * Copyright (c) 2006-2014 Erik Ekman <yarrick@kryo.se>,
+ * 2006-2009 Bjorn Andersson <flex@kryo.se>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -76,6 +77,7 @@ START_TEST(test_base64_encode)
len = sizeof(buf);
val = b64->encode(buf, &len, testpairs[_i].a, strlen(testpairs[_i].a));
+ fail_unless(val == strlen(testpairs[_i].b));
fail_unless(strcmp(buf, testpairs[_i].b) == 0,
"'%s' != '%s'", buf, testpairs[_i].b);
}
@@ -93,7 +95,7 @@ START_TEST(test_base64_decode)
len = sizeof(buf);
val = b64->decode(buf, &len, testpairs[_i].b, strlen(testpairs[_i].b));
- fail_unless(buf != NULL, "buf == NULL");
+ fail_unless(val == strlen(testpairs[_i].a));
fail_unless(strcmp(buf, testpairs[_i].a) == 0,
"'%s' != '%s'", buf, testpairs[_i].a);
}