Auto merge of #1420 - RalfJung:rustup, r=RalfJung
rustup adjust test for changed allocation strategy
This commit is contained in:
commit
af044209b0
@ -1 +1 @@
|
||||
84539360498cab3c70a7c9114c0b8106c8e1b06b
|
||||
672b272077561ca7b5027a8aff9ea2957c7d4c21
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user