Remove check that depends on malloc implementation.
Summary: - The EXPECT_EQ(vec.capacity(), vec2.capacity()) check is implicitly testing how the platform's malloc() and malloc_usable_size() implementations interact. We know that small_vector will attempt to allocate storage for 3 elements via malloc(), but the small_vector implementation then uses malloc_usable_size() to determine capacity, which can return more than the size requested by malloc(). As a result, capacity may grow more than expected depending on how the malloc implementation works. Test Plan: - fbconfig -r folly && fbmake runtests - ./configure && make check on Ubuntu/FC/Mac Reviewed By: alandau@fb.com FB internal diff: D1008922
Showing
Please register or sign in to comment