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

Method Evaluate

eval/compiler/flat_expr_builder_test.cc:110–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108 }
109
110 absl::Status Evaluate(absl::Span<const CelValue> args, CelValue* result,
111 google::protobuf::Arena* arena) const override {
112 if (args.size() != 2) {
113 return absl::InvalidArgumentError("Bad arguments number");
114 }
115
116 std::string concat = std::string(args[0].StringOrDie().value()) +
117 std::string(args[1].StringOrDie().value());
118
119 auto* concatenated =
120 google::protobuf::Arena::Create<std::string>(arena, std::move(concat));
121
122 *result = CelValue::CreateString(concatenated);
123
124 return absl::OkStatus();
125 }
126};
127
128class RecorderFunction : public CelFunction {

Callers 2

TESTFunction · 0.45
ASSERT_OK_AND_ASSIGNFunction · 0.45

Calls 3

StringOrDieMethod · 0.80
sizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected