Loading...
Searching...
No Matches
terminal_input_parser_test_fuzzer.cpp
Go to the documentation of this file.
// Copyright 2021 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.
#include "ftxui/component/terminal_input_parser.hpp"
extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) {
using namespace ftxui;
auto event_receiver = MakeReceiver<Task>();
{
auto parser = TerminalInputParser(event_receiver->MakeSender());
for (size_t i = 0; i < size; ++i) {
parser.Add(data[i]);
}
}
Task received;
while (event_receiver->Receive(&received)) {
// Do nothing.
}
return 0; // Non-zero return values are reserved for future use.
}
ftxui::TerminalInputParser
Definition terminal_input_parser.hpp:18
ftxui
Definition animation.hpp:10
ftxui::Task
std::variant< Event, Closure, AnimationTask > Task
Definition task.hpp:14
terminal_input_parser.hpp
LLVMFuzzerTestOneInput
int LLVMFuzzerTestOneInput(const char *data, size_t size)
Definition terminal_input_parser_test_fuzzer.cpp:6