Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-12-18 21:33:33 +0100
committerMartin Hořeňovský2022-12-18 21:33:45 +0100
commite6ec1c238b3c52e08b39787eaeefc5d98c404cbc (patch)
treeb681b61f9e511a4ac0f37300536528124a7dc5f0
parent477c1f5152b14884e26119520730451ed08be738 (diff)
downloadcatch3-e6ec1c238b3c52e08b39787eaeefc5d98c404cbc.tar.gz
Fix benchmarking example in the main readme
This uses the same fibonacci implementation as is used in the benchmark test. Closes #2568
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
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 <cstdint>
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]") {