comparison ui/tests/commontest.cpp @ 239:6b4ad6ccc48e

Change the specification of str_b64_decode so that it matches the way how polarssl handles base64 decoding.
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 28 Mar 2014 14:20:08 +0000
parents 6435e28ae753
children 17e1c8f37d72
comparison
equal deleted inserted replaced
238:dd417a2ff9cd 239:6b4ad6ccc48e
10 char *data = NULL; 10 char *data = NULL;
11 size_t data_size = 0; 11 size_t data_size = 0;
12 int ret = -1; 12 int ret = -1;
13 ret = str_base64_decode(&data, &data_size, (char *)foo, 5); 13 ret = str_base64_decode(&data, &data_size, (char *)foo, 5);
14 14
15 QVERIFY(ret != 0); 15 QVERIFY(ret == 0);
16 QVERIFY(data == NULL); 16 QVERIFY(data == QString::fromLatin1("foo"));
17 QVERIFY(data_size == 0);
18 free(data); 17 free(data);
19 } 18 }
20 19
21 void CommonTest::testStrBase64Decode() { 20 void CommonTest::testStrBase64Decode() {
22 char garbage[1000]; 21 char garbage[1000];

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