Skip to content

Commit

Permalink
Fix failing Linux CI check for CommissionerPasscode in TestTxtFields.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pgregorr-amazon committed Apr 19, 2024
1 parent cad954c commit 1e6c5d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/dnssd/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ struct DnssdNodeData
uint16_t productId = 0;
uint16_t pairingHint = 0;
uint8_t commissioningMode = 0;
bool commissionerPasscode = 0;
bool commissionerPasscode = false;
uint8_t rotatingId[kMaxRotatingIdLen] = {};
char instanceName[Commission::kInstanceNameMaxLength + 1] = {};
char deviceName[kMaxDeviceNameLen + 1] = {};
Expand Down
6 changes: 3 additions & 3 deletions src/lib/dnssd/tests/TestTxtFields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,12 @@ void TestFillDiscoveredNodeDataFromTxt(nlTestSuite * inSuite, void * inContext)
filled.nodeData.commissioningMode = 0;
NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled));

// Commissioning mode
// CommissionerPasscode
strcpy(key, "CP");
strcpy(val, "1");
FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData);
NL_TEST_ASSERT(inSuite, filled.nodeData.commissionerPasscode == 1);
filled.nodeData.commissionerPasscode = 0;
NL_TEST_ASSERT(inSuite, filled.nodeData.commissionerPasscode == true);
filled.nodeData.commissionerPasscode = false;
NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled));

// Device type
Expand Down

0 comments on commit 1e6c5d0

Please sign in to comment.