configure catch2 framework
This commit is contained in:
		
							parent
							
								
									2198f80e22
								
							
						
					
					
						commit
						5eacc49a62
					
				
					 3 changed files with 22 additions and 17799 deletions
				
			
		| 
						 | 
				
			
			@ -29,6 +29,7 @@ find_package(Qt5 COMPONENTS Widgets REQUIRED)
 | 
			
		|||
find_package(cppzmq REQUIRED)
 | 
			
		||||
find_package(nlohmann_json REQUIRED)
 | 
			
		||||
find_package(SQLite3 REQUIRED)
 | 
			
		||||
find_package(Catch2 REQUIRED)
 | 
			
		||||
 | 
			
		||||
add_executable(littlesnitch
 | 
			
		||||
    main.cpp
 | 
			
		||||
| 
						 | 
				
			
			@ -49,4 +50,17 @@ add_executable(littlesnitch
 | 
			
		|||
    editandresend.ui
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
target_include_directories(littlesnitch PRIVATE /usr/local/include)
 | 
			
		||||
target_link_libraries(littlesnitch PRIVATE Qt5::Widgets cppzmq sqlite3)
 | 
			
		||||
 | 
			
		||||
add_executable(littlesnitch_tests
 | 
			
		||||
    tests/generic_tests.cpp
 | 
			
		||||
    networkthread.cpp
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
target_include_directories(littlesnitch_tests PRIVATE /usr/local/include)
 | 
			
		||||
target_link_libraries(littlesnitch_tests PRIVATE Qt5::Widgets cppzmq sqlite3 Catch2::Catch2)
 | 
			
		||||
 | 
			
		||||
include(CTest)
 | 
			
		||||
include(Catch)
 | 
			
		||||
catch_discover_tests(littlesnitch_tests)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										17799
									
								
								tests/catch.hpp
									
										
									
									
									
								
							
							
						
						
									
										17799
									
								
								tests/catch.hpp
									
										
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										8
									
								
								tests/generic_tests.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								tests/generic_tests.cpp
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
#define CATCH_CONFIG_MAIN
 | 
			
		||||
#include <catch2/catch.hpp>
 | 
			
		||||
 | 
			
		||||
#include "networkthread.h"
 | 
			
		||||
 | 
			
		||||
TEST_CASE( "1 eq 1", "[test]" ) {
 | 
			
		||||
    REQUIRE( 1 == 1 );
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue