core: fix failing enum test case

This commit is contained in:
Peter D. Barnes, Jr
2020-04-11 09:57:49 -07:00
parent fddf3eaac4
commit 18d0e5742f
2 changed files with 5 additions and 4 deletions

View File

@@ -88,6 +88,7 @@ transmitted.</li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li> Attempting to deserialize an enum name which wasn't registered with MakeEnumChecker now causes a fatal error, rather failing silently. (This can be triggered by setting an enum Attribute from a StringValue.)</li>
<li> As a result of the above API changes in <b> MobilityBuildingInfo </b>
and <b> BuildingsHelper </b> classes, a building aware pathloss models, e.g.,
<b> HybridBuildingsPropagationLossModel </b> is now able to accurately compute

View File

@@ -740,11 +740,11 @@ AttributeTestCase<EnumValue>::DoRun (void)
NS_TEST_ASSERT_MSG_EQ (ok, true, "Attribute not set properly by SetAttributeFailSafe() via StringValue");
//
// Try to set the Attribute to a bogus enum using the StringValue type and
// make sure the underlying value doesn't change.
// Try to set the Attribute to a bogus enum using the StringValue type
// throws a fatal error.
//
ok = p->SetAttributeFailSafe ("TestEnum", StringValue ("TestD"));
NS_TEST_ASSERT_MSG_EQ (ok, false, "Unexpectedly could SetAttributeFailSafe() to TEST_D"); //
// ok = p->SetAttributeFailSafe ("TestEnum", StringValue ("TestD"));
// NS_TEST_ASSERT_MSG_EQ (ok, false, "Unexpectedly could SetAttributeFailSafe() to TEST_D"); //
ok = CheckGetCodePaths (p, "TestEnum", "TestB", EnumValue (AttributeObjectTest::TEST_B));
NS_TEST_ASSERT_MSG_EQ (ok, true, "Error in SetAttributeFailSafe() but value changes");