From 3846085c533effc34872b1ea846231a1c81cf7be Mon Sep 17 00:00:00 2001 From: Thomas Sedlmair Date: Wed, 13 Nov 2024 19:27:01 +0100 Subject: [PATCH] updated step definition --- examples/step_definition.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/step_definition.cpp b/examples/step_definition.cpp index dde8c58..584454a 100644 --- a/examples/step_definition.cpp +++ b/examples/step_definition.cpp @@ -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(); @@ -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}")