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

Function read_i64_values

nodedb-query/src/msgpack_scan/reader.rs:533–542  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

531
532 #[test]
533 fn read_i64_values() {
534 assert_eq!(read_i64(&[42u8], 0), Some(42));
535 assert_eq!(read_i64(&[0xffu8], 0), Some(-1));
536
537 let buf = encode(&json!(300));
538 assert_eq!(read_i64(&buf, 0), Some(300));
539
540 let buf = encode(&json!(-500));
541 assert_eq!(read_i64(&buf, 0), Some(-500));
542 }
543
544 #[test]
545 fn read_str_fixstr() {

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected