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

Method FakeStringMap

eval/public/builtin_func_test.cc:1220–1229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1218class FakeStringMap : public FakeMap<CelValue::StringHolder> {
1219 public:
1220 explicit FakeStringMap(const std::map<CelValue::StringHolder, CelValue>& data)
1221 : FakeMap(
1222 data,
1223 [](CelValue::StringHolder v) { return CelValue::CreateString(v); },
1224 [](CelValue v) -> absl::optional<CelValue::StringHolder> {
1225 if (!v.IsString()) {
1226 return absl::nullopt;
1227 }
1228 return v.StringOrDie();
1229 }) {}
1230};
1231
1232// Test list index access function

Callers

nothing calls this directly

Calls 2

StringOrDieMethod · 0.80
IsStringMethod · 0.45

Tested by

no test coverage detected