aboutsummaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-10-27 04:44:46 +0000
committerMike Buland <eichlan@xagasoft.com>2011-10-27 04:44:46 +0000
commit9906ffe3c54875133448134c09ec12a0949d48cd (patch)
tree0542fef3d27e796700b87b44394a3ad31dd5b852 /src/unit
parent411f240da34bab53cd18aa8b7ba09834ede49b1c (diff)
parent029b5d159023f4dad607359dbfaa2479e21fe9e5 (diff)
downloadlibbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.gz
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.bz2
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.xz
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.zip
Reorg'd! I merged in the release-fixup branch and fixed all random warnings.
I also cleaned up the build script, the symlink generation is faster and looks nicer, there's one think left to fix there, but it's not too bad.
Diffstat (limited to '')
-rw-r--r--src/unit/base64.unit28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/unit/base64.unit b/src/unit/base64.unit
new file mode 100644
index 0000000..e4630c5
--- /dev/null
+++ b/src/unit/base64.unit
@@ -0,0 +1,28 @@
1// vim: syntax=cpp
2/*
3 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
4 *
5 * This file is part of the libbu++ library and is released under the
6 * terms of the license contained in the file LICENSE.
7 */
8
9#include "bu/strfilter.h"
10#include "bu/base64.h"
11
12suite MemBuf
13{
14 test decode01
15 {
16 unitTest( Bu::decodeStr<Bu::Base64>("RnVu") == "Fun" );
17 unitTest( Bu::decodeStr<Bu::Base64>("V2hhdA==") == "What" );
18 unitTest( Bu::decodeStr<Bu::Base64>("SGVsbG8=") == "Hello" );
19 }
20
21 test encode01
22 {
23 unitTest( Bu::decodeStr<Bu::Base64>("R n V u") == "Fun" );
24 unitTest( Bu::decodeStr<Bu::Base64>("V2\n\n\thh dA==") == "What" );
25 unitTest( Bu::decodeStr<Bu::Base64>("\n\n\t\t SGV\r\ns\tbG8\n=") == "Hello" );
26 }
27}
28