@@ -72,7 +72,10 @@ enum class testing_simple_option {
72
72
73
73
class option_var_fixture {
74
74
public:
75
- option_var_fixture () : m_var(" LIBENVPP_TESTING_OPTION" , " SECOND_OPTION" ), m_simple(" LIBENVPP_TESTING_SIMPLE_OPTION" , " OPT_A" ) {}
75
+ option_var_fixture ()
76
+ : m_var(" LIBENVPP_TESTING_OPTION" , " SECOND_OPTION" ), m_simple(" LIBENVPP_TESTING_SIMPLE_OPTION" , " OPT_A" )
77
+ {
78
+ }
76
79
77
80
private:
78
81
detail::set_scoped_environment_variable m_var;
@@ -116,7 +119,8 @@ TEST_CASE_METHOD(option_var_fixture, "Retrieving option environment variable", "
116
119
{
117
120
auto pre = env::prefix (" LIBENVPP_TESTING" );
118
121
const auto option_id = pre.register_variable <testing_option>(" OPTION" );
119
- const auto simple_option_id = pre.register_option <testing_simple_option>(" SIMPLE_OPTION" , {{" OPT_A" , testing_simple_option::OPT_A}, {" OPT_B" , testing_simple_option::OPT_B}});
122
+ const auto simple_option_id = pre.register_option <testing_simple_option>(
123
+ " SIMPLE_OPTION" , {{" OPT_A" , testing_simple_option::OPT_A}, {" OPT_B" , testing_simple_option::OPT_B}});
120
124
auto parsed_and_validated_pre = pre.parse_and_validate ();
121
125
REQUIRE (parsed_and_validated_pre.ok ());
122
126
const auto option_val = parsed_and_validated_pre.get (option_id);
@@ -132,11 +136,14 @@ TEST_CASE("Parsing failure with 'simple' option handling", "[libenvpp]")
132
136
const auto _ = detail::set_scoped_environment_variable{" LIBENVPP_TESTING_SIMPLE_OPTION" , " INVALID_OPTION" };
133
137
134
138
auto pre = env::prefix (" LIBENVPP_TESTING" );
135
- (void )pre.register_option <testing_simple_option>(" SIMPLE_OPTION" , {{" OPT_A" , testing_simple_option::OPT_A}, {" OPT_B" , testing_simple_option::OPT_B}});
139
+ (void )pre.register_option <testing_simple_option>(
140
+ " SIMPLE_OPTION" , {{" OPT_A" , testing_simple_option::OPT_A}, {" OPT_B" , testing_simple_option::OPT_B}});
136
141
auto parsed_and_validated_pre = pre.parse_and_validate ();
137
142
REQUIRE_FALSE (parsed_and_validated_pre.ok ());
138
- CHECK_THAT (parsed_and_validated_pre.error_message (),
139
- ContainsSubstring (" 'LIBENVPP_TESTING_SIMPLE_OPTION': Unrecognized option 'INVALID_OPTION', should be one of [OPT_A, OPT_B]" ));
143
+ CHECK_THAT (
144
+ parsed_and_validated_pre.error_message (),
145
+ ContainsSubstring (
146
+ " 'LIBENVPP_TESTING_SIMPLE_OPTION': Unrecognized option 'INVALID_OPTION', should be one of [OPT_A, OPT_B]" ));
140
147
}
141
148
142
149
struct user_parsable_type {
0 commit comments