aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2024-03-15 11:39:24 +0100
committerMarco Bubke <marco.bubke@qt.io>2024-03-20 13:06:46 +0000
commitcea24ad00b86f15fbe549c1177e1852c4bed30d7 (patch)
tree3024ba6acb4fd58b6e4d5b20b4644fee1697623b /tests
parentb163510696ba36593d09cb81768a007143980956 (diff)
Utils: Add char append to SmallString
Change-Id: I644db7635010da8bc29d87926a64c4e6939d7c83 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/tests/unittests/utils/smallstring-test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/tests/unittests/utils/smallstring-test.cpp b/tests/unit/tests/unittests/utils/smallstring-test.cpp
index ac979ef65c..3594c838c9 100644
--- a/tests/unit/tests/unittests/utils/smallstring-test.cpp
+++ b/tests/unit/tests/unittests/utils/smallstring-test.cpp
@@ -959,6 +959,15 @@ TEST(SmallString, append_float)
ASSERT_THAT(text, Eq("some text123.456"));
}
+TEST(SmallString, append_character)
+{
+ SmallString text("some text");
+
+ text += 'x';
+
+ ASSERT_THAT(text, Eq("some textx"));
+}
+
TEST(SmallString, to_byte_array)
{
SmallString text("some text");