Utils: Add std::string conversion constructor and operator to small string

Change-Id: Ia76d7647fc8d2c9b72bc5bce2e7a6e2c3fcc18cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2016-08-01 17:21:07 +02:00
parent 390e2d164c
commit 0549c6af97
3 changed files with 24 additions and 0 deletions

View File

@@ -319,6 +319,15 @@ TEST(SmallString, RBeginPlusOneIsEqualREndForSmallStringWidthSizeOne)
ASSERT_THAT(beginPlusOne, Eq(text.rend()));
}
TEST(SmallString, ConstructorStandardString)
{
std::string stdStringText = "short string";
auto text = SmallString(stdStringText);
ASSERT_THAT(text, SmallString("short string"));
}
TEST(SmallString, ToQString)
{
SmallString text("short string");