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

Method PerformGetDateUTCTest

eval/public/extension_func_test.cc:153–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151 }
152
153 void PerformGetDateUTCTest(Arena* arena, absl::Time time_stamp,
154 CelValue* result) {
155 auto functions =
156 registry_.FindOverloads("date", true, {CelValue::Type::kTimestamp});
157 ASSERT_EQ(functions.size(), 1);
158
159 auto func = functions[0];
160
161 std::vector<CelValue> args = {CelValue::CreateTimestamp(time_stamp)};
162 absl::Span<CelValue> arg_span(&args[0], args.size());
163 auto status = func->Evaluate(arg_span, result, arena);
164
165 ASSERT_OK(status);
166 }
167
168 void PerformGetTimeOfDayTest(Arena* arena, absl::Time time_stamp,
169 std::string* time_zone, CelValue* result) {

Callers

nothing calls this directly

Calls 3

FindOverloadsMethod · 0.45
sizeMethod · 0.45
EvaluateMethod · 0.45

Tested by

no test coverage detected