mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	Setup unit test environment.
This commit is contained in:
		
							parent
							
								
									4ce7b0e9ef
								
							
						
					
					
						commit
						5d78e2f5e4
					
				
					 8 changed files with 50 additions and 2 deletions
				
			
		
							
								
								
									
										12
									
								
								tests/Identity.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								tests/Identity.cpp
									
										
									
									
									
										Normal 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
									
								
							
							
						
						
									
										19
									
								
								tests/Utility.cpp
									
										
									
									
									
										Normal 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()
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue