MCPcopy Create free account
hub / github.com/apache/kvrocks / TEST

Function TEST

tests/cppunit/ir_pass_test.cc:39–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37static auto Parse(const std::string& in) { return sql::ParseToIR(peg::string_input(in, "test")); }
38
39TEST(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
51TEST(IRPassTest, SimplifyBoolean) {
52 SimplifyBoolean sb;

Callers

nothing calls this directly

Calls 7

SemaCheckerClass · 0.85
GetValueMethod · 0.80
ParseFunction · 0.70
MakeIndexMapFunction · 0.70
ParseSFunction · 0.70
DumpMethod · 0.45
TransformMethod · 0.45

Tested by

no test coverage detected