[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:
Aleksandr Vodyanov
2024-11-21 17:23:08 +03:00
committed by Denis Patrakeev
parent bb6197bed7
commit e3106d807c
27 changed files with 928 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#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);
};
}