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

Method TestArithmeticalErrorInt64

eval/public/builtin_func_test.cc:308–316  ·  view source on GitHub ↗

Helper for testing invalid signed integer arithmetic operations.

Source from the content-addressed store, hash-verified

306
307 // Helper for testing invalid signed integer arithmetic operations.
308 void TestArithmeticalErrorInt64(absl::string_view operation, int64_t v1,
309 int64_t v2, absl::StatusCode code) {
310 CelValue result_value;
311 ASSERT_NO_FATAL_FAILURE(PerformRun(
312 operation, {}, {CelValue::CreateInt64(v1), CelValue::CreateInt64(v2)},
313 &result_value));
314 ASSERT_EQ(result_value.IsError(), true);
315 ASSERT_EQ(result_value.ErrorOrDie()->code(), code) << operation;
316 }
317
318 // Helper method to test arithmetical operations for Uint64
319 void TestArithmeticalOperationUint64(absl::string_view operation, uint64_t v1,

Callers

nothing calls this directly

Calls 3

codeMethod · 0.80
ErrorOrDieMethod · 0.80
IsErrorMethod · 0.45

Tested by

no test coverage detected