MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / MatchAndExplain

Method MatchAndExplain

common/value_testing.h:141–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 {}
140
141 bool MatchAndExplain(const ListValue& arg,
142 testing::MatchResultListener* result_listener) const {
143 std::vector<Value> elements;
144 absl::Status s = arg.ForEach(
145 [&](const Value& v) -> absl::StatusOr<bool> {
146 elements.push_back(v);
147 return true;
148 },
149 descriptor_pool_, message_factory_, arena_);
150 if (!s.ok()) {
151 *result_listener << "cannot convert to list of values: " << s;
152 return false;
153 }
154 return m_.MatchAndExplain(elements, result_listener);
155 }
156
157 void DescribeTo(std::ostream* os) const { *os << m_; }
158 void DescribeNegationTo(std::ostream* os) const { *os << m_; }

Callers

nothing calls this directly

Calls 3

ForEachMethod · 0.45
okMethod · 0.45
MatchAndExplainMethod · 0.45

Tested by

no test coverage detected