summaryrefslogtreecommitdiff
path: root/src/strings/strings2_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings/strings2_test.cpp')
-rw-r--r--src/strings/strings2_test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/strings/strings2_test.cpp b/src/strings/strings2_test.cpp
index 8ac8482..8b91306 100644
--- a/src/strings/strings2_test.cpp
+++ b/src/strings/strings2_test.cpp
@@ -228,4 +228,13 @@ TEST(StringTests, rlong)
EXPECT_EQ(&*r.begin(), &*r3.begin());
EXPECT_EQ(&*a.begin(), &*a3.begin());
}
+
+TEST(StringTest, rself)
+{
+ // force dynamic allocation; valgrind will check for memory errors
+ RString r = XString("foo bar baz"_s);
+ RString r2 = r;
+ r = r;
+ r = r2;
+}
} // namespace tmwa