tests: respect naming conventions and improve nesting of some test suites
Change-Id: I255c27b552b32570871a9d5f8bda814ba8723c80
Refs: #2497
diff --git a/tests/unit-tests/network-configuration-detector.hpp b/tests/unit-tests/network-configuration-detector.hpp
index 5619b58..95d2aa8 100644
--- a/tests/unit-tests/network-configuration-detector.hpp
+++ b/tests/unit-tests/network-configuration-detector.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -22,6 +22,22 @@
#ifndef NDN_TESTS_NETWORK_CONFIGURATION_DETECTOR_HPP
#define NDN_TESTS_NETWORK_CONFIGURATION_DETECTOR_HPP
+#define SKIP_IF_IPV4_UNAVAILABLE() \
+ do { \
+ if (!NetworkConfigurationDetector::hasIpv4()) { \
+ BOOST_WARN_MESSAGE(false, "skipping assertions that require IPv4 support"); \
+ return; \
+ } \
+ } while (false)
+
+#define SKIP_IF_IPV6_UNAVAILABLE() \
+ do { \
+ if (!NetworkConfigurationDetector::hasIpv6()) { \
+ BOOST_WARN_MESSAGE(false, "skipping assertions that require IPv6 support"); \
+ return; \
+ } \
+ } while (false)
+
namespace ndn {
namespace tests {