| #include "polly/Support/ISLTools.h" |
| static bool operator==(const isl::basic_set &A, const isl::basic_set &B) { |
| TEST(Support, isl_iterator) { |
| std::unique_ptr<isl_ctx, decltype(&isl_ctx_free)> RawCtx(isl_ctx_alloc(), |
| isl::ctx Ctx(RawCtx.get()); |
| Ctx, "{ [x, y] : 0 <= x <= 5 and y >= 0 and x > 0 and 0 < y <= 5 }"); |
| Ctx, "{ [x, y] : 0 <= x <= 5 and y >= 0 and x <= 4 and y <= 3 + x }"); |
| ASSERT_EQ(S.n_basic_set(), 2); |
| std::vector<isl::basic_set> Sets; |
| for (auto BS : S.get_basic_set_list()) |
| EXPECT_THAT(Sets, testing::UnorderedElementsAre(A, B)); |