forked from qt-creator/qt-creator
Utils: Fix short string capacity
The short string capacity is the data area size minus the size of \0. Change-Id: Iffb4428bb81fc78bdc4c00218cf9f2c9ac8c25e5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -1315,3 +1315,10 @@ TEST(SmallString, StringPlusOperator)
|
||||
|
||||
ASSERT_THAT(result, "text and more text");
|
||||
}
|
||||
|
||||
TEST(SmallString, ShortStringCapacity)
|
||||
{
|
||||
ASSERT_THAT(SmallString().shortStringCapacity(), 30);
|
||||
ASSERT_THAT(PathString().shortStringCapacity(), 189);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user