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

Function TEST

tests/cppunit/plan_executor_test.cc:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76TEST(PlanExecutorTest, Mock) {
77 auto op = std::make_unique<Mock>(std::vector<ExecutorNode::RowType>{});
78
79 auto ctx = ExecutorContext(op.get());
80 ASSERT_EQ(ctx.Next().GetValue(), exe_end);
81
82 op = std::make_unique<Mock>(std::vector<ExecutorNode::RowType>{{"a"}, {"b"}, {"c"}});
83
84 ctx = ExecutorContext(op.get());
85 ASSERT_EQ(NextRow(ctx).key, "a");
86 ASSERT_EQ(NextRow(ctx).key, "b");
87 ASSERT_EQ(NextRow(ctx).key, "c");
88 ASSERT_EQ(ctx.Next().GetValue(), exe_end);
89}
90
91static auto IndexI() -> const IndexInfo* { return index_map.Find("ia", "search_ns")->second.get(); }
92static auto FieldI(const std::string& f) -> const FieldInfo* { return &IndexI()->fields.at(f); }

Callers

nothing calls this directly

Calls 10

ExecutorContextClass · 0.85
NextRowFunction · 0.85
FieldIFunction · 0.85
NFunction · 0.85
IndexIFunction · 0.85
VFunction · 0.85
getMethod · 0.80
GetValueMethod · 0.80
TFunction · 0.70
NextMethod · 0.45

Tested by

no test coverage detected