()
| 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() { |