tests: skip IPv6 tests if IPv6 is not available
This commit also renames the getAvailableInterfaceIp() API
to getTestIp(), and improves its expressiveness.
Change-Id: I4b0080fb5e85cd523305ecb14183ef6acb34b5cd
Refs: #3367
diff --git a/tests/daemon/face/unicast-udp-transport-fixture.hpp b/tests/daemon/face/unicast-udp-transport-fixture.hpp
index 01698cb..74de35d 100644
--- a/tests/daemon/face/unicast-udp-transport-fixture.hpp
+++ b/tests/daemon/face/unicast-udp-transport-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,7 @@
#include "face/face.hpp"
#include "dummy-receive-link-service.hpp"
+#include "test-ip.hpp"
#include "tests/limited-io.hpp"
namespace nfd {
@@ -46,7 +47,7 @@
UnicastUdpTransportFixture()
: transport(nullptr)
, remoteSocket(g_io)
- , defaultAddr(ip::address_v4::loopback())
+ , defaultAddr(getTestIp<ip::address_v4>())
, receivedPackets(nullptr)
{
}