aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/shared_string_repo
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib/src/tests/shared_string_repo')
-rw-r--r--vespalib/src/tests/shared_string_repo/shared_string_repo_test.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/vespalib/src/tests/shared_string_repo/shared_string_repo_test.cpp b/vespalib/src/tests/shared_string_repo/shared_string_repo_test.cpp
index d560513e24d..aaf4a5e3e56 100644
--- a/vespalib/src/tests/shared_string_repo/shared_string_repo_test.cpp
+++ b/vespalib/src/tests/shared_string_repo/shared_string_repo_test.cpp
@@ -307,6 +307,12 @@ TEST("require that handle/string can be obtained from string_id") {
EXPECT_EQUAL(Handle::string_from_id(b.id()), vespalib::string("str"));
}
+TEST("require that handle can be self-assigned") {
+ Handle a("foo");
+ a = a;
+ EXPECT_EQUAL(a.as_string(), vespalib::string("foo"));
+}
+
//-----------------------------------------------------------------------------
TEST("require that basic multi-handle usage works") {