Setup unit test environment.

This commit is contained in:
EinMByte 2015-07-16 22:28:57 +02:00
parent 4ce7b0e9ef
commit 5d78e2f5e4
8 changed files with 50 additions and 2 deletions

12
tests/Identity.cpp Normal file
View file

@ -0,0 +1,12 @@
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include "../Identity.h"
BOOST_AUTO_TEST_SUITE(IdentityTests)
BOOST_AUTO_TEST_SUITE_END()

19
tests/Utility.cpp Normal file
View file

@ -0,0 +1,19 @@
#include <boost/test/unit_test.hpp>
#include "../util.h"
BOOST_AUTO_TEST_SUITE(UtilityTests)
using namespace i2p::util::http;
BOOST_AUTO_TEST_CASE(DecodeEmptyUrl)
{
BOOST_CHECK_EQUAL(urlDecode(""), "");
}
BOOST_AUTO_TEST_CASE(DecodeUrl)
{
BOOST_CHECK_EQUAL(urlDecode("%20"), " ");
}
BOOST_AUTO_TEST_SUITE_END()