Skip to content

Commit

Permalink
Update test files with focus
Browse files Browse the repository at this point in the history
  • Loading branch information
horrifyingHorse committed Dec 29, 2024
1 parent e5f777b commit f381317
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ftxui/dom/flexbox_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ TEST(FlexboxTest, Focus) {
paragraph("4 -"),
paragraph("5 -"),
paragraph("6 -"),
paragraph("7 -") | focus,
paragraph("7 -") | select,
paragraph("8 -"),
paragraph("9 -"),
}) |
Expand Down
4 changes: 2 additions & 2 deletions src/ftxui/dom/gridbox_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <string> // for allocator, basic_string, string
#include <vector> // for vector

#include "ftxui/dom/elements.hpp" // for text, operator|, Element, flex, Elements, flex_grow, flex_shrink, vtext, gridbox, vbox, focus, operator|=, border, frame
#include "ftxui/dom/elements.hpp" // for text, operator|, Element, flex, Elements, flex_grow, flex_shrink, vtext, gridbox, vbox, select, operator|=, border, frame
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/screen.hpp" // for Screen

Expand Down Expand Up @@ -603,7 +603,7 @@ TEST(GridboxTest, Focus) {
{cell("1"), cell("2"), cell("3"), cell("4")},
{cell("5"), cell("6"), cell("7"), cell("8")},
{cell("9"), cell("10"), cell("11"), cell("12")},
{cell("13"), cell("14") | focus, cell("15"), cell("16")},
{cell("13"), cell("14") | select, cell("15"), cell("16")},
{cell("17"), cell("18"), cell("19"), cell("20")},
});

Expand Down
6 changes: 3 additions & 3 deletions src/ftxui/dom/scroll_indicator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <string> // for allocator, to_string, string
#include <utility> // for move

#include "ftxui/dom/elements.hpp" // for operator|, Element, operator|=, text, vbox, Elements, border, focus, frame, vscroll_indicator
#include "ftxui/dom/elements.hpp" // for operator|, Element, operator|=, text, vbox, Elements, border, select, frame, vscroll_indicator
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/color.hpp" // for Color, Color::Red
#include "ftxui/screen/screen.hpp" // for Screen
Expand All @@ -19,7 +19,7 @@ Element MakeVerticalList(int focused_index, int n) {
for (int i = 0; i < n; ++i) {
auto element = text(std::to_string(i));
if (i == focused_index) {
element |= focus;
element |= select;
}
list.push_back(element);
}
Expand All @@ -31,7 +31,7 @@ Element MakeHorizontalList(int focused_index, int n) {
for (int i = 0; i < n; ++i) {
auto element = text(std::to_string(i));
if (i == focused_index) {
element |= focus;
element |= select;
}
list.push_back(element);
}
Expand Down

0 comments on commit f381317

Please sign in to comment.