mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 07:37:46 +00:00
[tests] fix verification in test_routing_manager.cpp (#9548)
Some equation checks accidentally became non-zero checks due to typo. Such tests may fail in certain build configurations when the heap allocation is zero after initialization of the test.
This commit is contained in:
@@ -1309,7 +1309,7 @@ void TestOmrSelection(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
SuccessOrQuit(sInstance->Get<BorderRouter::RoutingManager>().SetEnabled(false));
|
||||
VerifyOrQuit(heapAllocations = sHeapAllocatedPtrs.GetLength());
|
||||
VerifyOrQuit(heapAllocations == sHeapAllocatedPtrs.GetLength());
|
||||
|
||||
Log("End of TestOmrSelection");
|
||||
FinalizeTest();
|
||||
@@ -1474,7 +1474,7 @@ void TestDefaultRoute(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
SuccessOrQuit(sInstance->Get<BorderRouter::RoutingManager>().SetEnabled(false));
|
||||
VerifyOrQuit(heapAllocations = sHeapAllocatedPtrs.GetLength());
|
||||
VerifyOrQuit(heapAllocations == sHeapAllocatedPtrs.GetLength());
|
||||
|
||||
Log("End of TestDefaultRoute");
|
||||
|
||||
@@ -1640,7 +1640,7 @@ void TestAdvNonUlaRoute(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
SuccessOrQuit(sInstance->Get<BorderRouter::RoutingManager>().SetEnabled(false));
|
||||
VerifyOrQuit(heapAllocations = sHeapAllocatedPtrs.GetLength());
|
||||
VerifyOrQuit(heapAllocations == sHeapAllocatedPtrs.GetLength());
|
||||
|
||||
Log("End of TestAdvNonUlaRoute");
|
||||
|
||||
@@ -1779,7 +1779,7 @@ void TestLocalOnLinkPrefixDeprecation(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
SuccessOrQuit(sInstance->Get<BorderRouter::RoutingManager>().SetEnabled(false));
|
||||
VerifyOrQuit(heapAllocations = sHeapAllocatedPtrs.GetLength());
|
||||
VerifyOrQuit(heapAllocations == sHeapAllocatedPtrs.GetLength());
|
||||
|
||||
Log("End of TestLocalOnLinkPrefixDeprecation");
|
||||
|
||||
@@ -1931,7 +1931,7 @@ void TestDomainPrefixAsOmr(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
SuccessOrQuit(sInstance->Get<BorderRouter::RoutingManager>().SetEnabled(false));
|
||||
VerifyOrQuit(heapAllocations = sHeapAllocatedPtrs.GetLength());
|
||||
VerifyOrQuit(heapAllocations == sHeapAllocatedPtrs.GetLength());
|
||||
|
||||
Log("End of TestDomainPrefixAsOmr");
|
||||
FinalizeTest();
|
||||
@@ -2440,7 +2440,7 @@ void TestExtPanIdChange(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
SuccessOrQuit(sInstance->Get<BorderRouter::RoutingManager>().SetEnabled(false));
|
||||
VerifyOrQuit(heapAllocations = sHeapAllocatedPtrs.GetLength());
|
||||
VerifyOrQuit(heapAllocations == sHeapAllocatedPtrs.GetLength());
|
||||
|
||||
Log("End of TestExtPanIdChange");
|
||||
FinalizeTest();
|
||||
@@ -2593,7 +2593,7 @@ void TestRouterNsProbe(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
SuccessOrQuit(sInstance->Get<BorderRouter::RoutingManager>().SetEnabled(false));
|
||||
VerifyOrQuit(heapAllocations = sHeapAllocatedPtrs.GetLength());
|
||||
VerifyOrQuit(heapAllocations == sHeapAllocatedPtrs.GetLength());
|
||||
|
||||
Log("End of TestRouterNsProbe");
|
||||
FinalizeTest();
|
||||
@@ -2812,7 +2812,7 @@ void TestConflictingPrefix(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
SuccessOrQuit(sInstance->Get<BorderRouter::RoutingManager>().SetEnabled(false));
|
||||
VerifyOrQuit(heapAllocations = sHeapAllocatedPtrs.GetLength());
|
||||
VerifyOrQuit(heapAllocations == sHeapAllocatedPtrs.GetLength());
|
||||
|
||||
Log("End of TestConflictingPrefix");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user