]> git.lizzy.rs Git - rust.git/commitdiff
adjust for changed allocation strategy
authorRalf Jung <post@ralfj.de>
Tue, 19 May 2020 22:00:35 +0000 (00:00 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 19 May 2020 22:00:35 +0000 (00:00 +0200)
rust-version
tests/run-pass/heap.rs

index b1b25c4bcab6830eca91674a941724c34cb18d60..7b8f0d43c89e76a7ea2f5e4b2adb81c22537c365 100644 (file)
@@ -1 +1 @@
-84539360498cab3c70a7c9114c0b8106c8e1b06b
+672b272077561ca7b5027a8aff9ea2957c7d4c21
index b533f916469881a96c23657ea33f4d65f6e2d218..44537e74b5a447edb0689a19faa9748b3253ddf8 100644 (file)
@@ -14,12 +14,12 @@ fn allocate_reallocate() {
     // 6 byte heap alloc (__rust_allocate)
     s.push_str("foobar");
     assert_eq!(s.len(), 6);
-    assert_eq!(s.capacity(), 6);
+    assert_eq!(s.capacity(), 8);
 
     // heap size doubled to 12 (__rust_reallocate)
     s.push_str("baz");
     assert_eq!(s.len(), 9);
-    assert_eq!(s.capacity(), 12);
+    assert_eq!(s.capacity(), 16);
 
     // heap size reduced to 9  (__rust_reallocate)
     s.shrink_to_fit();