MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_be_varint_with_start

Function test_be_varint_with_start

crates/compiler-core/src/varint.rs:132–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130
131 #[test]
132 fn test_be_varint_with_start() {
133 let mut buf = Vec::new();
134 write_varint_with_start(&mut buf, 42);
135 write_varint_with_start(&mut buf, 100);
136 write_varint_with_start(&mut buf, 71);
137
138 let mut pos = 0;
139 assert_eq!(read_varint_with_start(&buf, &mut pos), Some(42));
140 assert_eq!(read_varint_with_start(&buf, &mut pos), Some(100));
141 assert_eq!(read_varint_with_start(&buf, &mut pos), Some(71));
142 assert_eq!(read_varint_with_start(&buf, &mut pos), None);
143 }
144}

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
write_varint_with_startFunction · 0.85

Tested by

no test coverage detected