()
| 503 | |
| 504 | #[test] |
| 505 | fn incr_overflow() { |
| 506 | let mut engine = make_engine(); |
| 507 | // Set to MAX. |
| 508 | let bytes = zerompk::to_msgpack_vec(&i64::MAX).unwrap(); |
| 509 | engine.put(1, "counters", b"max", &bytes, 0, 1000, Surrogate::ZERO); |
| 510 | let result = engine.incr(1, "counters", b"max", 1, 0, 1000); |
| 511 | assert!(matches!(result, Err(AtomicError::Overflow))); |
| 512 | } |
| 513 | |
| 514 | #[test] |
| 515 | fn incr_type_mismatch() { |
nothing calls this directly
no test coverage detected