From fe43843a0825998da5485994a016046055542b8f Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Wed, 12 Aug 2020 16:05:49 -0700 Subject: [PATCH] add test coverage for discoverInterfaces --- testApp/utils/testInetAddressUtils.cpp | 59 +++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/testApp/utils/testInetAddressUtils.cpp b/testApp/utils/testInetAddressUtils.cpp index 8940184..9417679 100644 --- a/testApp/utils/testInetAddressUtils.cpp +++ b/testApp/utils/testInetAddressUtils.cpp @@ -1,6 +1,8 @@ #include #include +#include + #include #include @@ -17,6 +19,16 @@ using namespace epics::pvData; using namespace epics::pvAccess; using namespace std; +std::ostream& operator<<(std::ostream& strm, const osiSockAddr& addr) +{ + char buf[32]; + ipAddrToDottedIP(&addr.ia, buf, sizeof(buf)); + strm<0u, "Found %u interfaces", unsigned(ifaces.size())); + + for(size_t i=0; i