Helper for testing invalid signed integer arithmetic operations.
| 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, |
nothing calls this directly
no test coverage detected