diff options
author | Marco Bubke <marco.bubke@qt.io> | 2016-08-01 17:21:07 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2016-08-02 13:38:23 +0000 |
commit | 0549c6af977fbdc450987f415c2481fa62c2b851 (patch) | |
tree | 53af37b1faffe2a0a9b02cd5d3b6c7f75ecd57cd /tests | |
parent | 390e2d164c01d879538c9147cb43eb91dbfe8669 (diff) | |
download | qt-creator-0549c6af977fbdc450987f415c2481fa62c2b851.tar.gz |
Utils: Add std::string conversion constructor and operator to small string
Change-Id: Ia76d7647fc8d2c9b72bc5bce2e7a6e2c3fcc18cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/unittest/smallstringtest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/unittest/smallstringtest.cpp b/tests/unit/unittest/smallstringtest.cpp index 0e70dac047..b634b84b6d 100644 --- a/tests/unit/unittest/smallstringtest.cpp +++ b/tests/unit/unittest/smallstringtest.cpp @@ -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"); |