fw: rename BestRouteStrategy2 class to BestRouteStrategy
Also rename ad-hoc-forwarding.t.cpp to strategy-ad-hoc-face.t.cpp
and broadcast-medium.t.cpp to strategy-broadcast-medium.t.cpp,
for consistency with the other strategy-*.t.cpp test suites.
Change-Id: Ia8f5257260563732d74c7d58e35481b73a231f06
diff --git a/tests/other/fw/congestion-mark-strategy.cpp b/tests/other/fw/congestion-mark-strategy.cpp
index 9543fda..672e9ef 100644
--- a/tests/other/fw/congestion-mark-strategy.cpp
+++ b/tests/other/fw/congestion-mark-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,11 +31,9 @@
NFD_REGISTER_STRATEGY(CongestionMarkStrategy);
CongestionMarkStrategy::CongestionMarkStrategy(Forwarder& forwarder, const Name& name)
- // Specifying BestRouteStrategy2's own name in its constructor prevents an exception from occuring
+ // Specifying BestRouteStrategy's own name in its constructor prevents an exception from occuring
// when specifying parameters to CongestionMarkStrategy
- : BestRouteStrategy2(forwarder, BestRouteStrategy2::getStrategyName())
- , m_congestionMark(1)
- , m_shouldPreserveMark(true)
+ : BestRouteStrategy(forwarder, BestRouteStrategy::getStrategyName())
{
ParsedInstanceName parsed = parseInstanceName(name);
switch (parsed.parameters.size()) {
@@ -86,10 +84,10 @@
if (mark != m_congestionMark && (!m_shouldPreserveMark || mark == 0)) {
Interest markedInterest(interest);
markedInterest.setCongestionMark(m_congestionMark);
- BestRouteStrategy2::afterReceiveInterest(ingress, markedInterest, pitEntry);
+ BestRouteStrategy::afterReceiveInterest(ingress, markedInterest, pitEntry);
}
else {
- BestRouteStrategy2::afterReceiveInterest(ingress, interest, pitEntry);
+ BestRouteStrategy::afterReceiveInterest(ingress, interest, pitEntry);
}
}
diff --git a/tests/other/fw/congestion-mark-strategy.hpp b/tests/other/fw/congestion-mark-strategy.hpp
index cf78403..57c1bbe 100644
--- a/tests/other/fw/congestion-mark-strategy.hpp
+++ b/tests/other/fw/congestion-mark-strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,21 +26,21 @@
#ifndef NFD_TESTS_OTHER_FW_CONGESTION_MARK_STRATEGY_HPP
#define NFD_TESTS_OTHER_FW_CONGESTION_MARK_STRATEGY_HPP
-#include "daemon/fw/best-route-strategy2.hpp"
+#include "daemon/fw/best-route-strategy.hpp"
namespace nfd {
namespace fw {
-/** \brief Congestion Mark integration testing strategy version 1
+/** \brief Congestion Mark integration testing strategy
*
* This strategy adds a CongestionMark to each Interest it forwards. Otherwise, behaves like
- * BestRouteStrategy2.
+ * BestRouteStrategy.
*
* The value of the added CongestionMark can be specified through a strategy parameter (defaults
* to 1). In addition, an optional boolean parameter specifies whether the strategy will preserve
* existing CongestionMarks (default) or replace them.
*/
-class CongestionMarkStrategy : public BestRouteStrategy2
+class CongestionMarkStrategy : public BestRouteStrategy
{
public:
explicit
@@ -54,8 +54,8 @@
const shared_ptr<pit::Entry>& pitEntry) override;
private:
- uint64_t m_congestionMark;
- bool m_shouldPreserveMark;
+ uint64_t m_congestionMark = 1;
+ bool m_shouldPreserveMark = true;
};
} // namespace fw