diff --git a/tests/amqpprox_dnsresolver.t.cpp b/tests/amqpprox_dnsresolver.t.cpp index f5f9b30..1767aa5 100644 --- a/tests/amqpprox_dnsresolver.t.cpp +++ b/tests/amqpprox_dnsresolver.t.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/tests/amqpprox_session.t.cpp b/tests/amqpprox_session.t.cpp index 1213cff..e215ca5 100644 --- a/tests/amqpprox_session.t.cpp +++ b/tests/amqpprox_session.t.cpp @@ -89,6 +89,16 @@ using ConnectComplete = TestSocketState::ConnectComplete; const char LOCAL_HOSTNAME[] = "amqpprox-host"; +// To fix compilation error (gtest ver >=1.12.1) in EXPECT_THAT macro when +// validating TestSocketState::Item. Since TestSocketState::Item is a variant, +// googletest requires operator<< / PrintTo to be defined for every member of +// the variant. +void PrintTo(const TestSocketState::Func &, std::ostream *stream) +{ + *stream << "invoked PrintTo for object of type 'const " + "TestSocketState::Func'\n"; +} + struct SelectorMock : public ConnectionSelectorInterface { virtual ~SelectorMock() {}