[DO-987] catch recipe (!3)
Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech> Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/3 Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team> Co-authored-by: Aleksandr Vodyanov <aleksandr.vodyanov@avroid.team> Co-committed-by: Aleksandr Vodyanov <aleksandr.vodyanov@avroid.team>
This commit is contained in:
committed by
Denis Patrakeev
parent
bb6197bed7
commit
e3106d807c
11
recipes/catch2/2.x.x/test_package/200-benchmark.cpp
Normal file
11
recipes/catch2/2.x.x/test_package/200-benchmark.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
unsigned int Factorial( unsigned int number ) {
|
||||
return number > 1 ? Factorial(number-1)*number : 1;
|
||||
}
|
||||
|
||||
TEST_CASE( "compiles and runs" ) {
|
||||
BENCHMARK("factorial 25"){
|
||||
return Factorial(25);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user