summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2021-10-13 21:30:16 +0000
committerArne H Juul <arnej@yahooinc.com>2021-10-13 21:30:20 +0000
commit2173f8b0a9e4a249affa0675b2733b569d53fdc4 (patch)
tree9f8117b99e208bcdb18adde4996324836c17f28a /vespalib
parent49abdf3577164e661b6d38bd0a3395923107794e (diff)
add PrintTo for vespalib::string
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/gtest/gtest.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/gtest/gtest.h b/vespalib/src/vespa/vespalib/gtest/gtest.h
index f4aaa670e76..a584c75c434 100644
--- a/vespalib/src/vespa/vespalib/gtest/gtest.h
+++ b/vespalib/src/vespa/vespalib/gtest/gtest.h
@@ -3,6 +3,15 @@
#pragma once
#include <gtest/gtest.h>
+#include <vespa/vespalib/stllike/string.h>
+#include <iostream>
+
+namespace vespalib {
+// Tell google test how to print vespalib::string values:
+static inline void PrintTo(const vespalib::string & value, std::ostream * os) {
+ *os << value;
+}
+}
/**
* Macro for creating a main function that runs all gtests.