Test Plan: folly/test/fbstring_test in debug mode
Reviewed By: sdoroshenko@fb.com
FB internal diff:
D661622
fbstring_core() {
// Only initialize the tag, will set the MSBs (i.e. the small
// string size) to zero too
- ml_.capacity_ = maxSmallSize << (8 * (sizeof(size_t) - 1));
+ ml_.capacity_ = maxSmallSize << (8 * (sizeof(size_t) - sizeof(Char)));
// or: setSmallSize(0);
writeTerminator();
assert(category() == isSmall && size() == 0);
cp += "bb";
}
}
+ {
+ // D661622
+ basic_fbstring<wchar_t> s;
+ EXPECT_EQ(0, s.size());
+ }
}