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

Method Find

common/values/custom_map_value_test.cc:127–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125
126 private:
127 absl::StatusOr<bool> Find(
128 const Value& key,
129 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
130 google::protobuf::MessageFactory* absl_nonnull message_factory,
131 google::protobuf::Arena* absl_nonnull arena,
132 Value* absl_nonnull result) const override {
133 if (auto string_key = key.AsString(); string_key) {
134 if (*string_key == "foo") {
135 *result = TrueValue();
136 return true;
137 }
138 if (*string_key == "bar") {
139 *result = IntValue(1);
140 return true;
141 }
142 }
143 return false;
144 }
145
146 absl::StatusOr<bool> Has(
147 const Value& key,

Callers 1

TEST_FFunction · 0.45

Calls 3

TrueValueFunction · 0.85
IntValueClass · 0.70
AsStringMethod · 0.45

Tested by

no test coverage detected