Files
conan-build/recipes/catch2/3.x.x/test_package/400-benchmark-with-prefix.cpp
Aleksandr Vodyanov e3106d807c [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>
2024-11-21 17:23:08 +03:00

13 lines
307 B
C++

#include <catch2/catch_test_macros.hpp>
#include <catch2/benchmark/catch_benchmark.hpp>
unsigned int Factorial( unsigned int number ) {
return number > 1 ? Factorial(number-1)*number : 1;
}
CATCH_TEST_CASE( "compiles and runs" ) {
CATCH_BENCHMARK("factorial 25"){
return Factorial(25);
};
}