forked from catchorg/Catch2
Fix benchmarking example in the main readme
This uses the same fibonacci implementation as is used in the benchmark test. Closes #2568
This commit is contained in:
@ -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]") {
|
||||
|
Reference in New Issue
Block a user