Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and cecille committed Jun 29, 2021
1 parent ab1b0d1 commit fd119f6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/lib/mdns/minimal/tests/TestResponseSender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#include <string>
#include <vector>

#include <mdns/minimal/RecordData.h>
#include <mdns/minimal/core/FlatAllocatedQName.h>
#include <mdns/minimal/responders/Ptr.h>
#include <mdns/minimal/responders/Srv.h>
#include <mdns/minimal/responders/Txt.h>
#include <mdns/minimal/RecordData.h>

#include <support/CHIPMem.h>
#include <support/UnitTestRegistration.h>
Expand Down Expand Up @@ -62,18 +62,21 @@ class CheckOnlyServer : public ServerBase, public ParserDelegate
// For now, types and names are sufficient for checking that the response sender is sending out the correct records.
if (data.GetType() == expectedRecord[i]->GetType() && data.GetName() == expectedRecord[i]->GetName())
{
if (data.GetType() == QType::PTR) {
if (data.GetType() == QType::PTR)
{
// Check that the internal values are the same
SerializedQNameIterator dataTarget;
ParsePtrRecord(data.GetData(), data.GetData(), &dataTarget);
const PtrResourceRecord* expectedPtr = static_cast<const PtrResourceRecord*>(expectedRecord[i]);
if (dataTarget == expectedPtr->GetPtr()) {
foundRecord[i] = true;
const PtrResourceRecord * expectedPtr = static_cast<const PtrResourceRecord *>(expectedRecord[i]);
if (dataTarget == expectedPtr->GetPtr())
{
foundRecord[i] = true;
recordIsExpected = true;
break;
}
}
else {
else
{
foundRecord[i] = true;
recordIsExpected = true;
break;
Expand Down Expand Up @@ -103,7 +106,7 @@ class CheckOnlyServer : public ServerBase, public ParserDelegate
if (expectedRecord[i] == nullptr)
{
expectedRecord[i] = record;
foundRecord[i] = false;
foundRecord[i] = false;
return;
}
}
Expand Down

0 comments on commit fd119f6

Please sign in to comment.