fw: move STRATEGY_NAME to getStrategyName static function
This avoids potential problems with static initialization order.
refs #3868
Change-Id: I13f0ff6c51c0a3bd43af7993233ff63a4bca9cf9
diff --git a/tests/daemon/fw/access-strategy.t.cpp b/tests/daemon/fw/access-strategy.t.cpp
index c0a0240..5d2155d 100644
--- a/tests/daemon/fw/access-strategy.t.cpp
+++ b/tests/daemon/fw/access-strategy.t.cpp
@@ -52,7 +52,7 @@
BOOST_AUTO_TEST_CASE(Registration)
{
- BOOST_CHECK_EQUAL(Strategy::listRegistered().count(AccessStrategy::STRATEGY_NAME), 1);
+ BOOST_CHECK_EQUAL(Strategy::listRegistered().count(AccessStrategy::getStrategyName()), 1);
}
class TwoLaptopsFixture : public UnitTestTimeFixture
diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index c0aa337..a6385b1 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-strategy.t.cpp
@@ -40,7 +40,7 @@
BOOST_AUTO_TEST_CASE(Registration)
{
- BOOST_CHECK_EQUAL(Strategy::listRegistered().count(AsfStrategy::STRATEGY_NAME), 1);
+ BOOST_CHECK_EQUAL(Strategy::listRegistered().count(AsfStrategy::getStrategyName()), 1);
}
class AsfGridFixture : public UnitTestTimeFixture
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index b8406b5..d664544 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -75,7 +75,7 @@
BOOST_AUTO_TEST_CASE(Registration)
{
- BOOST_CHECK_EQUAL(Strategy::listRegistered().count(BestRouteStrategy2::STRATEGY_NAME), 1);
+ BOOST_CHECK_EQUAL(Strategy::listRegistered().count(BestRouteStrategy2::getStrategyName()), 1);
}
BOOST_AUTO_TEST_CASE(Forward)
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index a5255b5..1322930 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -40,7 +40,7 @@
BOOST_AUTO_TEST_CASE(Registration)
{
- BOOST_CHECK_EQUAL(Strategy::listRegistered().count(MulticastStrategy::STRATEGY_NAME), 1);
+ BOOST_CHECK_EQUAL(Strategy::listRegistered().count(MulticastStrategy::getStrategyName()), 1);
}
BOOST_AUTO_TEST_CASE(Forward2)
diff --git a/tests/daemon/fw/ncc-strategy.t.cpp b/tests/daemon/fw/ncc-strategy.t.cpp
index a792404..d7a01f2 100644
--- a/tests/daemon/fw/ncc-strategy.t.cpp
+++ b/tests/daemon/fw/ncc-strategy.t.cpp
@@ -42,7 +42,7 @@
BOOST_AUTO_TEST_CASE(Registration)
{
- BOOST_CHECK_EQUAL(Strategy::listRegistered().count(NccStrategy::STRATEGY_NAME), 1);
+ BOOST_CHECK_EQUAL(Strategy::listRegistered().count(NccStrategy::getStrategyName()), 1);
}
// NccStrategy is fairly complex.
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index 07bc0b0..14265d5 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -43,7 +43,7 @@
public:
explicit
StrategyTester(Forwarder& forwarder)
- : S(forwarder, Name(S::STRATEGY_NAME).append("tester"))
+ : S(forwarder, Name(S::getStrategyName()).append("tester"))
{
}