From e6ec1c238b3c52e08b39787eaeefc5d98c404cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 18 Dec 2022 21:33:33 +0100 Subject: [PATCH] Fix benchmarking example in the main readme This uses the same fibonacci implementation as is used in the benchmark test. Closes #2568 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a0b99c3..a275f7de 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ TEST_CASE( "Factorials are computed", "[factorial]" ) { #include uint64_t fibonacci(uint64_t number) { - return number < 2 ? 1 : fibonacci(number - 1) + fibonacci(number - 2); + return number < 2 ? number : fibonacci(number - 1) + fibonacci(number - 2); } TEST_CASE("Benchmark Fibonacci", "[!benchmark]") {