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

Method TestArithmeticalErrorUint64

eval/public/builtin_func_test.cc:330–338  ·  view source on GitHub ↗

Helper for testing invalid unsigned integer arithmetic operations.

Source from the content-addressed store, hash-verified

328
329 // Helper for testing invalid unsigned integer arithmetic operations.
330 void TestArithmeticalErrorUint64(absl::string_view operation, uint64_t v1,
331 uint64_t v2, absl::StatusCode code) {
332 CelValue result_value;
333 ASSERT_NO_FATAL_FAILURE(PerformRun(
334 operation, {}, {CelValue::CreateUint64(v1), CelValue::CreateUint64(v2)},
335 &result_value));
336 ASSERT_EQ(result_value.IsError(), true);
337 ASSERT_EQ(result_value.ErrorOrDie()->code(), code) << operation;
338 }
339
340 // Helper method to test arithmetical operations for Double
341 void TestArithmeticalOperationDouble(absl::string_view operation, double v1,

Callers

nothing calls this directly

Calls 3

codeMethod · 0.80
ErrorOrDieMethod · 0.80
IsErrorMethod · 0.45

Tested by

no test coverage detected