From 31b5fac9c5ae451668c072a43b9d98c48a71a05f Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Sun, 26 Sep 2021 15:59:01 +0200 Subject: [PATCH] Add fuzzer to Maybe & Dropdown. --- src/ftxui/component/component_fuzzer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ftxui/component/component_fuzzer.cpp b/src/ftxui/component/component_fuzzer.cpp index e04220c..640a330 100644 --- a/src/ftxui/component/component_fuzzer.cpp +++ b/src/ftxui/component/component_fuzzer.cpp @@ -57,7 +57,7 @@ Component GeneratorComponent(const char*& data, size_t& size, int depth) { if (depth <= 0) return Button(GeneratorString(data, size), [] {}); - switch (value % 16) { + switch (value % 18) { case 1: return Checkbox(GeneratorString(data, size), &g_bool); case 2: @@ -102,6 +102,10 @@ Component GeneratorComponent(const char*& data, size_t& size, int depth) { &g_int); case 15: return Container::Tab(GeneratorComponents(data, size, depth - 1), &g_int); + case 16: + return Maybe(GeneratorComponent(data, size, depth - 1), &g_bool); + case 17: + return Dropdown(&g_list, &g_int); default: return Button(GeneratorString(data, size), [] {}); }