FBString: remove unnecessary 7-byte padding in large strings
[folly.git] / folly / test / FBStringTest.cpp
index 6c6f099cac711a06dee53961276e1192e8e06e7f..fba17f6895433e428ca98d458c6c6ef349dc4813 100644 (file)
@@ -1277,9 +1277,10 @@ TEST(FBString, testFixedBugs) {
 
     struct {
       std::atomic<size_t> refCount_;
-      char data_[1];
     } dummyRefCounted;
-    EXPECT_EQ(str.capacity(), goodMallocSize(3840) - sizeof(dummyRefCounted));
+    EXPECT_EQ(
+        str.capacity(),
+        goodMallocSize(3840) - sizeof(dummyRefCounted) - sizeof(char));
   }
 }