FTXUI  5.0.0
C++ functional terminal UI.
Loading...
Searching...
No Matches
terminal_input_parser_test_fuzzer.cpp
Go to the documentation of this file.
1// Copyright 2021 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
5
6extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) {
7 using namespace ftxui;
8 auto event_receiver = MakeReceiver<Task>();
9 {
10 auto parser = TerminalInputParser(event_receiver->MakeSender());
11 for (size_t i = 0; i < size; ++i) {
12 parser.Add(data[i]);
13 }
14 }
15
16 Task received;
17 while (event_receiver->Receive(&received)) {
18 // Do nothing.
19 }
20 return 0; // Non-zero return values are reserved for future use.
21}
std::variant< Event, Closure, AnimationTask > Task
Definition task.hpp:14
int LLVMFuzzerTestOneInput(const char *data, size_t size)