@@ -129,14 +129,14 @@ TEST(ParseConfiguration, MergeConfigurations) {
129
129
EXPECT_EQ (" check1,check2,check3,check4" , *Options.Checks );
130
130
EXPECT_EQ (" filter2" , *Options.HeaderFilterRegex );
131
131
EXPECT_EQ (" user2" , *Options.User );
132
- ASSERT_TRUE (Options.ExtraArgs .hasValue ());
132
+ ASSERT_TRUE (Options.ExtraArgs .has_value ());
133
133
EXPECT_EQ (" arg1,arg2,arg3,arg4" , llvm::join (Options.ExtraArgs ->begin (),
134
134
Options.ExtraArgs ->end (), " ," ));
135
- ASSERT_TRUE (Options.ExtraArgsBefore .hasValue ());
135
+ ASSERT_TRUE (Options.ExtraArgsBefore .has_value ());
136
136
EXPECT_EQ (" arg-before1,arg-before2,arg-before3,arg-before4" ,
137
137
llvm::join (Options.ExtraArgsBefore ->begin (),
138
138
Options.ExtraArgsBefore ->end (), " ," ));
139
- ASSERT_TRUE (Options.UseColor .hasValue ());
139
+ ASSERT_TRUE (Options.UseColor .has_value ());
140
140
EXPECT_TRUE (*Options.UseColor );
141
141
}
142
142
@@ -325,9 +325,9 @@ TEST(CheckOptionsValidation, ValidIntOptions) {
325
325
326
326
CHECK_VAL (TestCheck.getIntLocal (" IntExpected" ), 1 );
327
327
CHECK_VAL (TestCheck.getIntGlobal (" GlobalIntExpected" ), 1 );
328
- EXPECT_FALSE (TestCheck.getIntLocal (" IntInvalid1" ).hasValue ());
329
- EXPECT_FALSE (TestCheck.getIntLocal (" IntInvalid2" ).hasValue ());
330
- EXPECT_FALSE (TestCheck.getIntGlobal (" GlobalIntInvalid" ).hasValue ());
328
+ EXPECT_FALSE (TestCheck.getIntLocal (" IntInvalid1" ).has_value ());
329
+ EXPECT_FALSE (TestCheck.getIntLocal (" IntInvalid2" ).has_value ());
330
+ EXPECT_FALSE (TestCheck.getIntGlobal (" GlobalIntInvalid" ).has_value ());
331
331
ASSERT_EQ (TestCheck.getIntLocal (" DefaultedIntInvalid" , 1 ), 1 );
332
332
333
333
CHECK_VAL (TestCheck.getIntLocal <bool >(" BoolITrueValue" ), true );
@@ -395,14 +395,14 @@ TEST(ValidConfiguration, ValidEnumOptions) {
395
395
/* IgnoreCase*/ true ),
396
396
Colours::Violet);
397
397
398
- EXPECT_FALSE (TestCheck.getIntLocal <Colours>(" ValidWrongCase" ).hasValue ());
399
- EXPECT_FALSE (TestCheck.getIntLocal <Colours>(" NearMiss" ).hasValue ());
400
- EXPECT_FALSE (TestCheck.getIntGlobal <Colours>(" GlobalInvalid" ).hasValue ());
398
+ EXPECT_FALSE (TestCheck.getIntLocal <Colours>(" ValidWrongCase" ).has_value ());
399
+ EXPECT_FALSE (TestCheck.getIntLocal <Colours>(" NearMiss" ).has_value ());
400
+ EXPECT_FALSE (TestCheck.getIntGlobal <Colours>(" GlobalInvalid" ).has_value ());
401
401
EXPECT_FALSE (
402
- TestCheck.getIntGlobal <Colours>(" GlobalValidWrongCase" ).hasValue ());
403
- EXPECT_FALSE (TestCheck.getIntGlobal <Colours>(" GlobalNearMiss" ).hasValue ());
402
+ TestCheck.getIntGlobal <Colours>(" GlobalValidWrongCase" ).has_value ());
403
+ EXPECT_FALSE (TestCheck.getIntGlobal <Colours>(" GlobalNearMiss" ).has_value ());
404
404
405
- EXPECT_FALSE (TestCheck.getIntLocal <Colours>(" Invalid" ).hasValue ());
405
+ EXPECT_FALSE (TestCheck.getIntLocal <Colours>(" Invalid" ).has_value ());
406
406
EXPECT_THAT (
407
407
DiagConsumer.take (),
408
408
UnorderedElementsAre (
0 commit comments