Changeset View
Changeset View
Standalone View
Standalone View
mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | if (!hasSample) { | ||||
llvm::errs() << "getIntegerLexMin gave sample: "; | llvm::errs() << "getIntegerLexMin gave sample: "; | ||||
dump(*maybeLexMin); | dump(*maybeLexMin); | ||||
} | } | ||||
} else { | } else { | ||||
ASSERT_TRUE(maybeSample.hasValue()); | ASSERT_TRUE(maybeSample.hasValue()); | ||||
EXPECT_TRUE(poly.containsPoint(*maybeSample)); | EXPECT_TRUE(poly.containsPoint(*maybeSample)); | ||||
ASSERT_FALSE(maybeLexMin.isEmpty()); | ASSERT_FALSE(maybeLexMin.isEmpty()); | ||||
if (maybeLexMin.isUnbounded()) | if (maybeLexMin.isUnbounded()) { | ||||
EXPECT_TRUE(Simplex(poly).isUnbounded()); | EXPECT_TRUE(Simplex(poly).isUnbounded()); | ||||
if (maybeLexMin.isBounded()) | } | ||||
if (maybeLexMin.isBounded()) { | |||||
EXPECT_TRUE(poly.containsPoint(*maybeLexMin)); | EXPECT_TRUE(poly.containsPoint(*maybeLexMin)); | ||||
} | } | ||||
} | |||||
break; | break; | ||||
case TestFunction::Empty: | case TestFunction::Empty: | ||||
EXPECT_EQ(!hasSample, poly.isIntegerEmpty()); | EXPECT_EQ(!hasSample, poly.isIntegerEmpty()); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
/// Check sampling for all the permutations of the dimensions for the given | /// Check sampling for all the permutations of the dimensions for the given | ||||
▲ Show 20 Lines • Show All 1,092 Lines • Show Last 20 Lines |