FTXUI  5.0.0
C++ functional terminal UI.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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.
4#include <vector>
6
7extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) {
8 using namespace ftxui;
9 auto event_receiver = MakeReceiver<Task>();
10 {
11 auto parser = TerminalInputParser(event_receiver->MakeSender());
12 for (size_t i = 0; i < size; ++i)
13 parser.Add(data[i]);
14 }
15
16 Task received;
17 while (event_receiver->Receive(&received))
18 ;
19 return 0; // Non-zero return values are reserved for future use.
20}
Decorator size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.
Definition: size.cpp:90
std::variant< Event, Closure, AnimationTask > Task
Definition: task.hpp:14
int LLVMFuzzerTestOneInput(const char *data, size_t size)