Skip to content

Commit

Permalink
Fix unit test on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinez-silabs committed Jul 20, 2023
1 parent 49d5f41 commit d73eeb7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/dnssd/minimal_mdns/tests/CheckOnlyServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class CheckOnlyServer : private chip::PoolImpl<ServerBase::EndpointInfo, 0, chip
found = false;
}
};
static constexpr size_t kMaxExpectedTxt = 11;
static constexpr size_t kMaxExpectedTxt = 12;
KV mExpectedTxt[kMaxExpectedTxt];
size_t mNumExpectedTxtRecords = 0;
size_t mNumReceivedTxtRecords = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/dnssd/platform/tests/TestPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ test::ExpectedCall operationalCall2 = test::ExpectedCall()
.AddSubtype("_I5555666677778888")
.AddTxt("SII", "32")
.AddTxt("SAI", "30")
.AddTxt("STA", "10")
.AddTxt("SAT", "10")
.AddTxt("T", "1");

CommissionAdvertisingParameters commissionableNodeParamsSmall =
Expand Down Expand Up @@ -114,7 +114,7 @@ test::ExpectedCall commissionableLargeBasic = test::ExpectedCall()
.AddTxt("T", "1")
.AddTxt("SII", "3600000")
.AddTxt("SAI", "3600000")
.AddTxt("SAI", "65535")
.AddTxt("SAT", "65535")
.AddSubtype("_S2")
.AddSubtype("_L22")
.AddSubtype("_V555")
Expand Down
4 changes: 2 additions & 2 deletions src/platform/fake/DnssdImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ struct ExpectedCall
ChipLogProgress(Discovery, "\t%s", subtype[i].name);
}
ChipLogProgress(Discovery, "num txt = %lu", static_cast<unsigned long>(numTxt));
for (size_t i = 0; i < numSubtypes; ++i)
for (size_t i = 0; i < numTxt; ++i)
{
ChipLogProgress(Discovery, "\t%s = %s", txt[i].key, txt[i].value);
}
}

static constexpr size_t kMaxTxtRecords = 11;
static constexpr size_t kMaxTxtRecords = 12;
static constexpr size_t kMaxSubtypes = 10;
CallType callType = CallType::kUnknown;
DnssdServiceProtocol protocol = DnssdServiceProtocol::kDnssdProtocolUnknown;
Expand Down

0 comments on commit d73eeb7

Please sign in to comment.