diff ui/tests/commontest.cpp @ 233:d773e540dec3

Add checks for invalid input
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 28 Mar 2014 11:33:39 +0000
parents 1f44aae4528e
children 6435e28ae753
line wrap: on
line diff
--- a/ui/tests/commontest.cpp	Fri Mar 28 10:50:14 2014 +0100
+++ b/ui/tests/commontest.cpp	Fri Mar 28 11:33:39 2014 +0000
@@ -24,6 +24,13 @@
     QVERIFY(data_size == 1000);
     QVERIFY(data);
 
+    ret = str_base64_decode(&data, &data_size, (char *)ba.constData(), ba.size());
+    QVERIFY(ret != 0);
+
+    const char * foo = "bla";
+    ret = str_base64_decode(&data, &data_size, (char *)foo, 3);
+    QVERIFY(ret != 0);
+
     for (size_t i = 0; i < data_size; i++) {
         QVERIFY(garbage[i] == data[i]);
     }

http://wald.intevation.org/projects/trustbridge/