mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-29 06:35:51 +08:00
20 lines
578 B
C++
20 lines
578 B
C++
|
//#include "ftxui/component/event.hpp"
|
||
|
//#include "ftxui/component/receiver.hpp"
|
||
|
#include "ftxui/component/terminal_input_parser.hpp"
|
||
|
#include <vector>
|
||
|
|
||
|
extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) {
|
||
|
using namespace ftxui;
|
||
|
auto event_receiver = MakeReceiver<Event>();
|
||
|
{
|
||
|
auto parser = TerminalInputParser(event_receiver->MakeSender());
|
||
|
for (size_t i = 0; i < size; ++i)
|
||
|
parser.Add(data[i]);
|
||
|
}
|
||
|
|
||
|
Event received;
|
||
|
while (event_receiver->Receive(&received))
|
||
|
;
|
||
|
return 0; // Non-zero return values are reserved for future use.
|
||
|
}
|