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

Method Record

tools/branch_coverage.cc:90–101  ·  view source on GitHub ↗

Implement public interface.

Source from the content-addressed store, hash-verified

88
89 // Implement public interface.
90 void Record(int64_t expr_id, const Value& value) override {
91 auto value_or = interop_internal::ToLegacyValue(&arena_, value);
92
93 if (!value_or.ok()) {
94 // TODO(uncreated-issue/65): Use pointer identity for UnsupportedConversionError
95 // as a sentinel value. The legacy CEL value just wraps the error pointer.
96 // This can be removed after the value migration is complete.
97 RecordImpl(expr_id, CelValue::CreateError(&UnsupportedConversionError()));
98 } else {
99 return RecordImpl(expr_id, *value_or);
100 }
101 }
102
103 void RecordLegacyValue(int64_t expr_id, const CelValue& value) override {
104 return RecordImpl(expr_id, value);

Callers 1

TESTFunction · 0.80

Calls 3

ToLegacyValueFunction · 0.85
CreateErrorFunction · 0.50
okMethod · 0.45

Tested by 1

TESTFunction · 0.64