MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_mutable_reserve

Function test_mutable_reserve

arrow-buffer/src/buffer/mutable.rs:1309–1322  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1307
1308 #[test]
1309 fn test_mutable_reserve() {
1310 let mut buf = MutableBuffer::new(1);
1311 assert_eq!(64, buf.capacity());
1312
1313 // Reserving a smaller capacity should have no effect.
1314 buf.reserve(10);
1315 assert_eq!(64, buf.capacity());
1316
1317 buf.reserve(80);
1318 assert_eq!(128, buf.capacity());
1319
1320 buf.reserve(129);
1321 assert_eq!(256, buf.capacity());
1322 }
1323
1324 #[test]
1325 fn test_mutable_resize() {

Callers

nothing calls this directly

Calls 1

reserveMethod · 0.45

Tested by

no test coverage detected