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

Method PerformGetTimeOfDayTest

eval/public/extension_func_test.cc:168–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 }
167
168 void PerformGetTimeOfDayTest(Arena* arena, absl::Time time_stamp,
169 std::string* time_zone, CelValue* result) {
170 auto functions = registry_.FindOverloads(
171 "timeOfDay", true,
172 {CelValue::Type::kTimestamp, CelValue::Type::kString});
173 ASSERT_EQ(functions.size(), 1);
174
175 auto func = functions[0];
176
177 std::vector<CelValue> args = {CelValue::CreateTimestamp(time_stamp),
178 CelValue::CreateString(time_zone)};
179 absl::Span<CelValue> arg_span(&args[0], args.size());
180 auto status = func->Evaluate(arg_span, result, arena);
181
182 ASSERT_OK(status);
183 }
184
185 void PerformGetTimeOfDayUTCTest(Arena* arena, absl::Time time_stamp,
186 CelValue* result) {

Callers

nothing calls this directly

Calls 3

FindOverloadsMethod · 0.45
sizeMethod · 0.45
EvaluateMethod · 0.45

Tested by

no test coverage detected