From e0be8da3924031ea115c93551dfa463f84d3a120 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 29 Jan 2012 11:38:33 +0100 Subject: [PATCH] Unit tests for base32 encode/decode --- src/test/base32_tests.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/base32_tests.cpp diff --git a/src/test/base32_tests.cpp b/src/test/base32_tests.cpp new file mode 100644 index 0000000000..756c72b94d --- /dev/null +++ b/src/test/base32_tests.cpp @@ -0,0 +1,20 @@ +#include + +#include "util.h" + +BOOST_AUTO_TEST_SUITE(base32_tests) + +BOOST_AUTO_TEST_CASE(base32_testvectors) +{ + static const std::string vstrIn[] = {"","f","fo","foo","foob","fooba","foobar"}; + static const std::string vstrOut[] = {"","MY======","MZXQ====","MZXW6===","MZXW6YQ=","MZXW6YTB","MZXW6YTBOI======"}; + for (unsigned int i=0; i