utils+helper+tests: Fix an issue with RandomPolicy
This commit also extends ndn::ScenarioHelper to expose the underlying
StackHelper for customization, as well as adds a basic test case for the
RandomPolicy.
Change-Id: Ieb948996497fd282f1afe4e7c102ec224299ac7f
diff --git a/utils/trie/random-policy.hpp b/utils/trie/random-policy.hpp
index 1e2aa4a..a6e3517 100644
--- a/utils/trie/random-policy.hpp
+++ b/utils/trie/random-policy.hpp
@@ -23,6 +23,7 @@
/// @cond include_hidden
#include "ns3/random-variable-stream.h"
+#include "ns3/double.h"
#include <boost/intrusive/options.hpp>
#include <boost/intrusive/set.hpp>
@@ -92,8 +93,8 @@
, u_rand(CreateObject<UniformRandomVariable>())
, max_size_(100)
{
- u_rand->SetAttribute("Min", UintegerValue(0));
- u_rand->SetAttribute("Max", UintegerValue(std::numeric_limits<uint32_t>::max()));
+ u_rand->SetAttribute("Min", DoubleValue(0));
+ u_rand->SetAttribute("Max", DoubleValue(std::numeric_limits<uint32_t>::max()));
}
inline void