mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
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:
parent
477c1f5152
commit
e6ec1c238b
@ -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]") {
|
||||
|
Loading…
Reference in New Issue
Block a user