blob: de7a40036981271a6c8877786a25e82ea3a8a5df [file] [log] [blame]
Jonathan Metzman39b6ba92018-11-06 23:25:25 +00001// This file is distributed under the University of Illinois Open Source
2// License. See LICENSE.TXT for details.
3
4// Simple test for a fuzzer. Tests that fuzzer can read a file containing
5// carriage returns.
6#include <cstddef>
7#include <cstdint>
8#include <iostream>
9#include <string>
10
11extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) {
12 std::string InputStr(reinterpret_cast<const char*>(Data), Size);
13 std::string MagicStr("Hello\r\nWorld\r\n");
14 if (InputStr == MagicStr) {
15 std::cout << "BINGO!";
16 }
17 return 0;
18}