Mercurial > minori
view dep/fmt/test/fuzzing/main.cc @ 413:192da585a0a8 default tip
*: fix formatting
the clang-format file was broken andjust using LLVM defaults.
now it's fixed and is more in line with what I actually prefer my
code to look like -- esp. with regards to tabulators
| author | Paper <paper@tflc.us> |
|---|---|
| date | Sat, 25 Jul 2026 14:54:32 -0400 |
| parents | 1faa72660932 |
| children |
line wrap: on
line source
#include <cassert> #include <fstream> #include <vector> #include "fuzzer-common.h" extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); int main(int argc, char** argv) { for (int i = 1; i < argc; ++i) { std::ifstream in(argv[i]); assert(in); in.seekg(0, std::ios_base::end); const auto size = in.tellg(); assert(size >= 0); in.seekg(0, std::ios_base::beg); std::vector<char> buf(static_cast<size_t>(size)); in.read(buf.data(), size); assert(in.gcount() == size); LLVMFuzzerTestOneInput(as_bytes(buf.data()), buf.size()); } }
