FTXUI  0.8.1
C++ functional terminal UI.
terminal_input_parser_test_fuzzer.cpp
Go to the documentation of this file.
1 //#include "ftxui/component/event.hpp"
2 //#include "ftxui/component/receiver.hpp"
3 #include <vector>
5 
6 extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) {
7  using namespace ftxui;
8  auto event_receiver = MakeReceiver<Event>();
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  Event received;
16  while (event_receiver->Receive(&received))
17  ;
18  return 0; // Non-zero return values are reserved for future use.
19 }
20 
21 // Copyright 2021 Arthur Sonzogni. All rights reserved.
22 // Use of this source code is governed by the MIT license that can be found in
23 // the LICENSE file.
terminal_input_parser.hpp
ftxui
Definition: captured_mouse.hpp:6
LLVMFuzzerTestOneInput
int LLVMFuzzerTestOneInput(const char *data, size_t size)
Definition: terminal_input_parser_test_fuzzer.cpp:6
ftxui::size
Decorator size(Direction, Constraint, int value)
Apply a constraint on the size of an element.
Definition: size.cpp:86
ftxui::TerminalInputParser
Definition: terminal_input_parser.hpp:16
ftxui::Event
Represent an event. It can be key press event, a terminal resize, or more ...
Definition: event.hpp:25