Skip to content

Commit

Permalink
updated step definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ThoSe1990 committed Nov 13, 2024
1 parent eb329d8 commit 3846085
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/step_definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CUSTOM_PARAMETER(
"a custom date pattern")
{
date begin;
begin.month = std::string{CUKE_PARAM_ARG(1)};
begin.month = CUKE_PARAM_ARG(1).to_string();
begin.day = int(CUKE_PARAM_ARG(2));
begin.year = CUKE_PARAM_ARG(3).as<int>();

Expand All @@ -38,7 +38,8 @@ CUSTOM_PARAMETER(

CUSTOM_PARAMETER(custom_event, "{event}", R"('(.*?)')", "a custom event")
{
return CUKE_PARAM_ARG(1).to_string();
std::string event = CUKE_PARAM_ARG(1);
return event;
}

WHEN(using_date, "{event} is {date}")
Expand Down

0 comments on commit 3846085

Please sign in to comment.