KIT-MRT / arbitration_graphs

Hierarchical behavior models for complex decision-making and behavior generation in robotics
https://kit-mrt.github.io/arbitration_graphs/
MIT License
16 stars 0 forks source link

Fix build issues with `std::nullopt` in gtest `EXPECT_EQ` macros. #6

Closed orzechow closed 7 months ago

orzechow commented 9 months ago

gtest and std::nullopt don't always work well together, see #5

So, the fix is to use the bool operator() on our std::optional:

EXPECT_FALSE(testPriorityArbitrator.options().at(0)->verificationResult_.cached(time));

Runs on Ubuntu 20.04, 22.04 :ok_hand:

Maybe that didn't work in Ubuntu18.04 or so, such that I had to do the EXPECT_EQ back in the ancient days…

Closes #5

Of course, testing makes more sense when combined with #4