aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2021-12-14 13:52:24 +0000
committerHåvard Pettersen <havardpe@oath.com>2021-12-14 13:52:24 +0000
commitd65e09cce107478f2da65d7fdf9a0fdcabfdb059 (patch)
tree4c3fde3075f6a8d139f613ad33896b602a0089db /vespalib/src/tests
parent348b05de5ecbd4c36b7b5f694a7c26e69f0ea706 (diff)
a shared empty string
Diffstat (limited to 'vespalib/src/tests')
-rw-r--r--vespalib/src/tests/stllike/string_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/vespalib/src/tests/stllike/string_test.cpp b/vespalib/src/tests/stllike/string_test.cpp
index 95846e765f6..de384bce9ad 100644
--- a/vespalib/src/tests/stllike/string_test.cpp
+++ b/vespalib/src/tests/stllike/string_test.cpp
@@ -484,4 +484,9 @@ TEST("test that operator<() works with stringref versus string") {
EXPECT_FALSE(sb < sb);
}
+TEST("test that empty_string is shared and empty") {
+ EXPECT_TRUE(&empty_string() == &empty_string());
+ EXPECT_EQUAL(empty_string(), "");
+}
+
TEST_MAIN() { TEST_RUN_ALL(); }