#include "clang/Analysis/FlowSensitive/SimplifyConstraints.h"
#include "TestingSupport.h"
#include "clang/Analysis/FlowSensitive/Arena.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
namespace {
usingnamespaceclang;
usingnamespacedataflow;
ElementsAre;
IsEmpty;
class SimplifyConstraintsTest : public ::testing::Test { … };
void printConstraints(const llvm::SetVector<const Formula *> &Constraints,
raw_ostream &OS) { … }
std::string
constraintsToString(const llvm::SetVector<const Formula *> &Constraints) { … }
MATCHER_P(EqualsConstraints, Constraints,
"constraints are: " + constraintsToString(Constraints)) { … }
TEST_F(SimplifyConstraintsTest, TriviallySatisfiable) { … }
TEST_F(SimplifyConstraintsTest, SimpleContradiction) { … }
TEST_F(SimplifyConstraintsTest, ContradictionThroughEquivalence) { … }
TEST_F(SimplifyConstraintsTest, EquivalenceChain) { … }
TEST_F(SimplifyConstraintsTest, TrueAndFalseAtomsSimplifyOtherExpressions) { … }
TEST_F(SimplifyConstraintsTest, TrueAtomUnlocksEquivalenceChain) { … }
TEST_F(SimplifyConstraintsTest, TopLevelAndSplitIntoMultipleConstraints) { … }
}