IAP GITLAB

Skip to content
Snippets Groups Projects
Commit ecbff68b authored by ralfulrich's avatar ralfulrich
Browse files

added logging test

parent dd4b35e5
No related branches found
No related tags found
No related merge requests found
......@@ -11,3 +11,8 @@ target_include_directories (CORSIKAlogging INTERFACE $<BUILD_INTERFACE:${PROJECT
install (FILES Logger.h Sink.h MessageOn.h MessageOff.h NoSink.h Sink.h BufferedSink.h
DESTINATION include/Logging)
# code testing
add_executable (testLogging testLogging.cc)
target_link_libraries (testLogging CORSIKAlogging CORSIKAthirdparty) # for catch2
add_test (NAME testLogging COMMAND testLogging -o report.xml -r junit)
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <catch2/catch.hpp>
#include <Logging/Logger.h>
TEST_CASE( "Logging", "[Logging]" )
{
SECTION( "sectionOne" )
{
REQUIRE( 1/1 == 1 );
}
SECTION( "sectionTwo" )
{
REQUIRE_FALSE( 1/1 == 2 );
}
SECTION( "sectionThree" )
{
REQUIRE( 1/1 == 2 );
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment