[mac] add Mac::ExtendedPanId type (wrapping otExtendedPanId) (#4149)

This commit is contained in:
Abtin Keshavarzian
2019-09-09 17:03:06 -07:00
committed by Jonathan Hui
parent ad6af37d99
commit 276d866935
12 changed files with 128 additions and 61 deletions
+4 -2
View File
@@ -45,7 +45,8 @@ void TestMinimumPassphrase(void)
0xcc, 0xd1, 0xe4, 0xc0, 0x1d, 0x01, 0x54, 0xf8};
const char passphrase[] = "123456";
otInstance * instance = testInitInstance();
SuccessOrQuit(ot::MeshCoP::Commissioner::GeneratePSKc(passphrase, "OpenThread", sXPanId, pskc),
SuccessOrQuit(ot::MeshCoP::Commissioner::GeneratePSKc(passphrase, "OpenThread",
static_cast<const ot::Mac::ExtendedPanId &>(sXPanId), pskc),
"TestMinimumPassphrase failed to generate PSKc");
VerifyOrQuit(memcmp(pskc, expectedPskc, sizeof(pskc)) == 0, "TestMinimumPassphrase got wrong pskc");
testFreeInstance(instance);
@@ -74,7 +75,8 @@ void TestMaximumPassphrase(void)
"123456781234567";
otInstance *instance = testInitInstance();
SuccessOrQuit(ot::MeshCoP::Commissioner::GeneratePSKc(passphrase, "OpenThread", sXPanId, pskc),
SuccessOrQuit(ot::MeshCoP::Commissioner::GeneratePSKc(passphrase, "OpenThread",
static_cast<const ot::Mac::ExtendedPanId &>(sXPanId), pskc),
"TestMaximumPassphrase failed to generate PSKc");
VerifyOrQuit(memcmp(pskc, expectedPskc, sizeof(pskc)) == 0, "TestMaximumPassphrase got wrong pskc");
testFreeInstance(instance);