Instead of asserting merely that the flow condition doesn't imply that a variable is true, make the stronger assertion that the flow condition implies that the variable is false.
Reviewed By: ymandel, xazax.hun
Differential Revision: https://reviews.llvm.org/D155067
EXPECT_TRUE(EnvThen.flowConditionImplies(BarValThen));
auto &BarValElse = getFormula(*BarDecl, EnvElse);
- EXPECT_FALSE(EnvElse.flowConditionImplies(BarValElse));
+ EXPECT_TRUE(
+ EnvElse.flowConditionImplies(EnvElse.arena().makeNot(BarValElse)));
});
}
ASSERT_THAT(BarDecl, NotNull());
auto &BarValThen = getFormula(*BarDecl, EnvThen);
- EXPECT_FALSE(EnvThen.flowConditionImplies(BarValThen));
+ EXPECT_TRUE(
+ EnvThen.flowConditionImplies(EnvThen.arena().makeNot(BarValThen)));
auto &BarValElse = getFormula(*BarDecl, EnvElse);
EXPECT_TRUE(EnvElse.flowConditionImplies(BarValElse));