align command-line test suite to recent changes

This commit is contained in:
Tom Henderson
2013-08-16 08:28:39 -07:00
parent ae9ea26142
commit d006cf014f
2 changed files with 18 additions and 10 deletions

View File

@@ -133,15 +133,18 @@ or
<pre>
cmd.PrintHelp (std::cerr);
</pre>
</li>
<li>IPv4's ARP Request and IPv6's NS/RS are now transmitted with a random delay.
The delay is, by default, a uniform random variable in time between 0 and 10ms.
This is aimed at preventing reception errors due to collisions during wifi broadcasts.
This behaviour can be modified by using ArpL3Protocol's
<tt>RequestJitter</tt> and Icmpv6L4Protocol's <tt>SolicitationJitter</tt>
attributes or by using the new InternetStackHelper functions.
</li>
</li>
<li>IPv4's ARP Request and IPv6's NS/RS are now transmitted with a random delay.
The delay is, by default, a uniform random variable in time between 0 and 10ms.
This is aimed at preventing reception errors due to collisions during wifi broadcasts.
This behaviour can be modified by using ArpL3Protocol's
<tt>RequestJitter</tt> and Icmpv6L4Protocol's <tt>SolicitationJitter</tt>
attributes or by using the new InternetStackHelper functions.
</li>
<li>Command line boolean arguments specified with no integer value (e.g.
"--boolArg") will toggle the value from the default, instead of
always setting the value to true.
</li>
</ul>
<hr>

View File

@@ -102,8 +102,10 @@ CommandLineBooleanTestCase::DoRun (void)
{
CommandLine cmd;
bool myBool = true;
bool myDefaultFalseBool = false;
cmd.AddValue ("my-bool", "help", myBool);
cmd.AddValue ("my-false-bool", "help", myDefaultFalseBool);
Parse (cmd, 1, "--my-bool=0");
NS_TEST_ASSERT_MSG_EQ (myBool, false, "Command parser did not correctly set a boolean value to false");
@@ -112,7 +114,10 @@ CommandLineBooleanTestCase::DoRun (void)
NS_TEST_ASSERT_MSG_EQ (myBool, true, "Command parser did not correctly set a boolean value to true, given integer argument");
Parse (cmd, 1, "--my-bool");
NS_TEST_ASSERT_MSG_EQ (myBool, true, "Command parser did not correctly set a boolean value to true, given no argument");
NS_TEST_ASSERT_MSG_EQ (myBool, false, "Command parser did not correctly toggle a default true boolean value to false, given no argument");
Parse (cmd, 1, "--my-false-bool");
NS_TEST_ASSERT_MSG_EQ (myDefaultFalseBool, true, "Command parser did not correctly toggle a default false boolean value to true, given no argument");
Parse (cmd, 1, "--my-bool=t");
NS_TEST_ASSERT_MSG_EQ (myBool, true, "Command parser did not correctly set a boolean value to true, given 't' argument");