Skip to content

Commit

Permalink
Avoid boost::optional::has_value() in tests. (#1455)
Browse files Browse the repository at this point in the history
Use casting to `bool` instead.
There is `has_value()` in the boost 1.69 listed as a dependency. On the
other hand there are CI nodes with boost 1.65 without it. So there are
no reasons to decrease compatibility.

Relates-To: OLPEDGE-2845

Signed-off-by: Rustam Gamidov <[email protected]>
  • Loading branch information
rustam-gamidov-here authored Dec 6, 2023
1 parent add59f1 commit a06b5b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/common/matchers/NetworkUrlMatchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ MATCHER_P(HeadersContain, expected_header, "") {
}

MATCHER_P(HeadersContainOptional, expected_optional, "") {
if (!expected_optional.has_value()) {
if (!expected_optional) {
return true;
}
const auto& expected_header = expected_optional.value();
Expand Down

0 comments on commit a06b5b1

Please sign in to comment.