1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2026-01-06 03:41:10 +03:00

Fix capacity check in BufAccessor test

Summary:
IOBuf creates a buffer that has the capacity GE the input capacity.

(Note: this ignores all push blocking failures!)

Reviewed By: mjoras

Differential Revision: D21302978

fbshipit-source-id: 1c815389f514fe902a7d64520357051bb9f592e1
This commit is contained in:
Yang Chi
2020-04-29 08:49:04 -07:00
committed by Facebook GitHub Bot
parent 4bd6d42d3c
commit 18ce06e38d

View File

@@ -14,7 +14,7 @@ TEST(SimpleBufAccessor, BasicAccess) {
SimpleBufAccessor accessor(1000);
EXPECT_TRUE(accessor.ownsBuffer());
auto buf = accessor.obtain();
EXPECT_EQ(1000, buf->capacity());
EXPECT_LE(1000, buf->capacity());
EXPECT_FALSE(accessor.ownsBuffer());
auto empty = accessor.obtain();
EXPECT_EQ(nullptr, empty);