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.
4
#include <vector>
5
#include "
ftxui/component/terminal_input_parser.hpp
"
6
7
extern
"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
}
ftxui::TerminalInputParser
Definition
terminal_input_parser.hpp:20
ftxui
Definition
animation.hpp:12
ftxui::size
Decorator size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.
Definition
size.cpp:90
ftxui::MakeReceiver
Receiver< T > MakeReceiver()
Definition
receiver.hpp:134
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:7