| 11 | const auto settings = CppBenchmark::Settings().ParamRange(chunk_size_from, chunk_size_to, [](int from, int to, int& result) { int r = result; result *= 2; return r; }); |
| 12 | |
| 13 | class FileFixture |
| 14 | { |
| 15 | protected: |
| 16 | FILE* file; |
| 17 | std::array<uint8_t, chunk_size_to> buffer; |
| 18 | |
| 19 | FileFixture() : file(nullptr), buffer() |
| 20 | { |
| 21 | // Open file for binary write |
| 22 | file = fopen("fwrite.out", "wb"); |
| 23 | } |
| 24 | |
| 25 | ~FileFixture() |
| 26 | { |
| 27 | // Close file |
| 28 | fclose(file); |
| 29 | |
| 30 | // Delete file |
| 31 | remove("fwrite.out"); |
| 32 | } |
| 33 | }; |
| 34 | |
| 35 | BENCHMARK_FIXTURE(FileFixture, "fwrite()", settings) |
| 36 | { |
nothing calls this directly
no outgoing calls
no test coverage detected