MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / incr_float_infinity_rejected

Function incr_float_infinity_rejected

nodedb/src/engine/kv/engine_atomic.rs:563–569  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

561
562 #[test]
563 fn incr_float_infinity_rejected() {
564 let mut engine = make_engine();
565 let bytes = zerompk::to_msgpack_vec(&f64::MAX).unwrap();
566 engine.put(1, "scores", b"big", &bytes, 0, 1000, Surrogate::ZERO);
567 let result = engine.incr_float(1, "scores", b"big", f64::MAX, 1000);
568 assert!(matches!(result, Err(AtomicError::Overflow)));
569 }
570
571 #[test]
572 fn cas_create_if_not_exists() {

Callers

nothing calls this directly

Calls 3

incr_floatMethod · 0.80
make_engineFunction · 0.70
putMethod · 0.45

Tested by

no test coverage detected