Skip to content

Commit

Permalink
Made helper test functions for common parameters non-constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
rsore committed Oct 22, 2024
1 parent 7ef886e commit 2f64f94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/common_flags_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ template <CLArgs::CmdFlag Flag>
using FlagTesterParser = decltype(CLArgs::ParserBuilder{}.add_flag<Flag>().build());

template <CLArgs::CmdFlag Flag>
constexpr void
void
test_flag_not_passed()
{
SECTION("Flag not passed to parser")
Expand All @@ -24,7 +24,7 @@ test_flag_not_passed()
}

template <CLArgs::CmdFlag Flag, CLArgs::StringLiteral Identifier, CLArgs::StringLiteral... Identifiers>
constexpr void
void
test_flag_passed()
{
SECTION("Pass argument \"" + std::string(Identifier.value) + "\" to parser")
Expand All @@ -43,7 +43,7 @@ test_flag_passed()
}

template <CLArgs::CmdFlag Flag, CLArgs::StringLiteral... Identifiers>
constexpr void
void
test_flag()
{
test_flag_not_passed<Flag>();
Expand Down
6 changes: 3 additions & 3 deletions tests/common_options_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ template <CLArgs::CmdOption Option>
using OptionTesterParser = decltype(CLArgs::ParserBuilder{}.add_option<Option>().build());

template <CLArgs::CmdOption Option>
constexpr void
void
test_option_not_passed()
{
SECTION("Flag not passed to parser")
Expand All @@ -24,7 +24,7 @@ test_option_not_passed()
}

template <CLArgs::CmdOption Option, CLArgs::StringLiteral Value, CLArgs::StringLiteral Identifier, CLArgs::StringLiteral... Identifiers>
constexpr void
void
test_option_passed()
{
SECTION("Pass argument \"" + std::string(Identifier.value) + "\" to parser")
Expand All @@ -43,7 +43,7 @@ test_option_passed()
}

template <CLArgs::CmdOption Option, CLArgs::StringLiteral Value, CLArgs::StringLiteral... Identifiers>
constexpr void
void
test_option()
{
test_option_not_passed<Option>();
Expand Down

0 comments on commit 2f64f94

Please sign in to comment.