Skip to content

Commit

Permalink
Fix rocket unit tests for clang 18
Browse files Browse the repository at this point in the history
  • Loading branch information
timower committed Oct 3, 2024
1 parent b26e9c2 commit f88363e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions test/unit/TestRocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ imgFile=c
}

TEST_CASE("App", "[rocket]") {
App app(AppDescription{ .name = "yes", .command = "sleep 5000" });
App app(AppDescription{ .path = "",
.name = "yes",
.description = "",
.command = "sleep 5000",
.icon = {},
.iconPath = {} });

REQUIRE(app.launch());
usleep(500);
Expand All @@ -147,7 +152,12 @@ TEST_CASE("App", "[rocket]") {
TEST_CASE("AppWidget", "[rocket]") {
auto ctx = TestContext::make();

App app(AppDescription{ .name = "foo", .command = "/usr/bin/ls" });
App app(AppDescription{ .path = "",
.name = "foo",
.description = "",
.command = "/usr/bin/ls",
.icon = {},
.iconPath = {} });

SECTION("AppWidget") {
int clicked = 0;
Expand All @@ -166,8 +176,8 @@ TEST_CASE("AppWidget", "[rocket]") {

bool current = GENERATE(true, false);

ctx.pumpWidget(Center(RunningAppWidget(
app, [&] { tapped++; }, [&] { killed++; }, current)));
ctx.pumpWidget(Center(
RunningAppWidget(app, [&] { tapped++; }, [&] { killed++; }, current)));

auto appWidget = ctx.findByType<RunningAppWidget>();
REQUIRE_THAT(
Expand Down

0 comments on commit f88363e

Please sign in to comment.