realloc.rs 356 B

123456789101112131415161718192021
  1. extern crate ralloc;
  2. #[test]
  3. fn test() {
  4. {
  5. let mut vec = Vec::new();
  6. vec.reserve(1);
  7. vec.reserve(2);
  8. vec.reserve(3);
  9. vec.reserve(100);
  10. vec.reserve(600);
  11. vec.reserve(1000);
  12. vec.reserve(2000);
  13. vec.push(1);
  14. vec.push(2);
  15. }
  16. ralloc::lock().debug_assert_no_leak();
  17. }