| 37 | static auto Parse(const std::string& in) { return sql::ParseToIR(peg::string_input(in, "test")); } |
| 38 | |
| 39 | TEST(IRPassTest, Simple) { |
| 40 | auto ir = *Parse("select a from b where not c = 1 or d hastag \"x\" and 2 <= e order by e asc limit 0, 10"); |
| 41 | |
| 42 | auto original = ir->Dump(); |
| 43 | |
| 44 | struct MyVisitor : Visitor { |
| 45 | std::string_view Name() override { return ""; }; |
| 46 | } visitor; |
| 47 | auto ir2 = visitor.Transform(std::move(ir)); |
| 48 | ASSERT_EQ(original, ir2->Dump()); |
| 49 | } |
| 50 | |
| 51 | TEST(IRPassTest, SimplifyBoolean) { |
| 52 | SimplifyBoolean sb; |
nothing calls this directly
no test coverage detected