For testing any binaries, e.g. from fuzzing.
| 2379 | |
| 2380 | // For testing any binaries, e.g. from fuzzing. |
| 2381 | void LoadVerifyBinaryTest() { |
| 2382 | std::string binary; |
| 2383 | if (flatbuffers::LoadFile((test_data_path + |
| 2384 | "fuzzer/your-filename-here").c_str(), |
| 2385 | true, &binary)) { |
| 2386 | flatbuffers::Verifier verifier( |
| 2387 | reinterpret_cast<const uint8_t *>(binary.data()), binary.size()); |
| 2388 | TEST_EQ(VerifyMonsterBuffer(verifier), true); |
| 2389 | } |
| 2390 | } |
| 2391 | |
| 2392 | void CreateSharedStringTest() { |
| 2393 | flatbuffers::FlatBufferBuilder builder; |
no test coverage detected