diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp index 3727b5f60436..3cc847118e55 100644 --- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp +++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp index 5682aa76de7c..84215c005114 100644 --- a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp +++ b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/searchlib/src/tests/searchcommon/schema/schema_test.cpp b/searchlib/src/tests/searchcommon/schema/schema_test.cpp index 22ed3cfdefb2..4d0010ee54e0 100644 --- a/searchlib/src/tests/searchcommon/schema/schema_test.cpp +++ b/searchlib/src/tests/searchcommon/schema/schema_test.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/streamingvisitors/src/tests/searchvisitor/searchvisitor_test.cpp b/streamingvisitors/src/tests/searchvisitor/searchvisitor_test.cpp index d16050de8e30..2480180d3bd4 100644 --- a/streamingvisitors/src/tests/searchvisitor/searchvisitor_test.cpp +++ b/streamingvisitors/src/tests/searchvisitor/searchvisitor_test.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/vdslib/src/tests/state/clusterstatetest.cpp b/vdslib/src/tests/state/clusterstatetest.cpp index 86dddadb4dd4..42dd615e9481 100644 --- a/vdslib/src/tests/state/clusterstatetest.cpp +++ b/vdslib/src/tests/state/clusterstatetest.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/vespalib/src/vespa/vespalib/gtest/gtest.h b/vespalib/src/vespa/vespalib/gtest/gtest.h index 86b30bd81f62..d0285110b458 100644 --- a/vespalib/src/vespa/vespalib/gtest/gtest.h +++ b/vespalib/src/vespa/vespalib/gtest/gtest.h @@ -3,15 +3,6 @@ #pragma once #include -#include -#include - -namespace vespalib { -// Tell google test how to print std::string values: -static inline void PrintTo(const std::string & value, std::ostream * os) { - *os << value; -} -} /** * Macro for creating a main function that runs all gtests. @@ -29,7 +20,7 @@ main(int argc, char* argv[]) \ TRY_BLOCK; \ FAIL() << "exception '" << MESSAGE << "' not thrown at all!"; \ } catch(EXCEPTION_TYPE& e) { \ - EXPECT_TRUE(contains(std::string_view(e.what()), std::string_view(MESSAGE))) << \ + EXPECT_TRUE(std::string_view(e.what()).find(std::string_view(MESSAGE)) != std::string_view::npos) << \ " e.what(): " << e.what() << "\n"; \ } catch(...) { \ FAIL() << "wrong exception type thrown"; \