From e029e467dd37b6ee71dae74dc3e194f4cf26cf7c Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 Date: Fri, 17 Jun 2022 23:07:27 +0530 Subject: [PATCH] Added Auto generated file --- .../chip-tool/zap-generated/test/Commands.h | 3910 ++++++++--------- .../zap-generated/test/Commands.h | 2048 ++------- 2 files changed, 2110 insertions(+), 3848 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0358215190c22e..2f833fae16a897 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -35,9 +35,6 @@ class TestList : public Command CHIP_ERROR Run() override { printf("TestAccessControlCluster\n"); - printf("Test_TC_BI_1_1\n"); - printf("Test_TC_BI_2_1\n"); - printf("Test_TC_BI_2_2\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); printf("Test_TC_BRAC_1_1\n"); @@ -63,7 +60,6 @@ class TestList : public Command printf("Test_TC_CC_8_1\n"); printf("Test_TC_BINFO_2_1\n"); printf("Test_TC_DESC_1_1\n"); - printf("Test_TC_EMR_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); printf("Test_TC_FLW_1_1\n"); @@ -153,10 +149,10 @@ class TestList : public Command printf("Test_TC_TSUIC_1_1\n"); printf("Test_TC_TSUIC_2_1\n"); printf("Test_TC_TSUIC_2_2\n"); - printf("Test_TC_DIAG_TH_NW_1_1\n"); - printf("Test_TC_DIAG_TH_NW_1_2\n"); + printf("Test_TC_DIAG_TH_NW_2_1\n"); printf("Test_TC_DIAG_TH_NW_2_2\n"); printf("Test_TC_DIAG_TH_NW_2_3\n"); + printf("Test_TC_DIAG_TH_NW_2_4\n"); printf("Test_TC_ULABEL_1_1\n"); printf("Test_TC_ULABEL_2_2\n"); printf("Test_TC_ULABEL_2_3\n"); @@ -347,7 +343,10 @@ class ManualTestList : public Command printf("Test_TC_CGEN_2_2\n"); printf("Test_TC_CGEN_2_3\n"); printf("Test_TC_CGEN_2_4\n"); - printf("Test_TC_GENDIAG_1_2\n"); + printf("Test_TC_DGGEN_2_2\n"); + printf("Test_TC_DGGEN_2_3\n"); + printf("Test_TC_DGGEN_3_1\n"); + printf("Test_TC_DGGEN_3_2\n"); printf("Test_TC_I_3_1\n"); printf("Test_TC_I_3_2\n"); printf("Test_TC_ILL_2_2\n"); @@ -425,6 +424,7 @@ class ManualTestList : public Command printf("Test_TC_MOD_3_1\n"); printf("Test_TC_MOD_3_2\n"); printf("Test_TC_MOD_3_3\n"); + printf("Test_TC_MOD_3_4\n"); printf("Test_TC_SU_1_1\n"); printf("Test_TC_SU_2_1\n"); printf("Test_TC_SU_2_2\n"); @@ -515,15 +515,19 @@ class ManualTestList : public Command printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_2\n"); printf("Test_TC_SWTCH_3_1\n"); + printf("Test_TC_SWTCH_3_2\n"); printf("Test_TC_TM_2_2\n"); printf("Test_TC_TM_3_1\n"); printf("Test_TC_TSTAT_3_1\n"); printf("Test_TC_TSTAT_3_2\n"); printf("Test_TC_TSUIC_3_1\n"); - printf("Test_TC_DIAG_TH_NW_2_6\n"); - printf("Test_TC_DIAG_TH_NW_2_7\n"); - printf("Test_TC_DIAG_TH_NW_2_8\n"); - printf("Test_TC_DIAG_TH_NW_2_9\n"); + printf("Test_TC_DIAG_TH_NW_1_1\n"); + printf("Test_TC_DIAG_TH_NW_2_5\n"); + printf("Test_TC_DIAG_TH_NW_3_1\n"); + printf("Test_TC_DIAG_TH_NW_3_2\n"); + printf("Test_TC_DIAG_TH_NW_3_3\n"); + printf("Test_TC_DIAG_TH_NW_3_4\n"); + printf("Test_TC_DIAG_TH_NW_3_5\n"); printf("Test_TC_ACT_1_1\n"); printf("Test_TC_ACT_2_1\n"); printf("Test_TC_ACT_2_2\n"); @@ -546,6 +550,7 @@ class ManualTestList : public Command printf("Test_TC_S_2_2\n"); printf("Test_TC_S_2_3\n"); printf("Test_TC_S_3_1\n"); + printf("Test_TC_PCC_3_1\n"); return CHIP_NO_ERROR; } @@ -1851,10 +1856,10 @@ class TestAccessControlClusterSuite : public TestCommand } }; -class Test_TC_BI_1_1Suite : public TestCommand +class Test_TC_BOOL_1_1Suite : public TestCommand { public: - Test_TC_BI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BI_1_1", 7, credsIssuerConfig) + Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1862,7 +1867,7 @@ class Test_TC_BI_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BI_1_1Suite() {} + ~Test_TC_BOOL_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -1902,19 +1907,48 @@ class Test_TC_BI_1_1Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 6)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -1923,803 +1957,233 @@ class Test_TC_BI_1_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute : FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the global attribute: EventList"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BI_2_1Suite : public TestCommand -{ -public: - Test_TC_BI_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BI_2_1", 12, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BI_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("outOfService", value, 0)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("outOfService", value, 0)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("presentValue", value, 0)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read mandatory non-global attribute: OutOfService"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::OutOfService::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read mandatory non-global attribute constraints: OutOfService"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::OutOfService::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Write the default values to mandatory non-global attribute: OutOfService"); - ListFreer listFreer; - bool value; - value = 0; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::OutOfService::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Reads back the mandatory non-global attribute: OutOfService"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::OutOfService::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read mandatory non-global attribute constraints: PresentValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::PresentValue::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Write the default values to mandatory non-global attribute: PresentValue"); - ListFreer listFreer; - bool value; - value = 0; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::PresentValue::Id, value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "Reads back the mandatory non-global attribute: PresentValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::PresentValue::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read mandatory non-global attribute: StatusFlags"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::StatusFlags::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Read mandatory non-global attribute constraints: StatusFlags"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::StatusFlags::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "Write the default values to mandatory non-global attribute: StatusFlags"); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::StatusFlags::Id, value, chip::NullOptional, chip::NullOptional); - } - case 11: { - LogStep(11, "Reads back the mandatory non-global attribute: StatusFlags"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::StatusFlags::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BI_2_2Suite : public TestCommand -{ -public: - Test_TC_BI_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BI_2_2", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BI_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("presentValue", value, 0)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("outOfService", value, 0)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("presentValue", value, 0)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("outOfService", value, 0)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0U)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Reads PresentValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_PRESENTVALUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::PresentValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Reads OutOfService attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OUTOFSERVICE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::OutOfService::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Reads StatusFlags attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_STATUSFLAGS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::StatusFlags::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Reads PresentValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_PRESENTVALUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::PresentValue::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Reads OutOfService attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OUTOFSERVICE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::OutOfService::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Reads StatusFlags attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_STATUSFLAGS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::StatusFlags::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "Reads StatusFlags attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_STATUSFLAGS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::StatusFlags::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Reads StatusFlags attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_STATUSFLAGS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, - BinaryInputBasic::Attributes::StatusFlags::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_1_1Suite : public TestCommand -{ -public: - Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 6)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute constraints : FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, - BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, - BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_2_1Suite : public TestCommand -{ -public: - Test_TC_BOOL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("stateValue", value, 0)); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read mandatory non-global attribute: StateValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::StateValue::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BRAC_1_1Suite : public TestCommand -{ -public: - Test_TC_BRAC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BRAC_1_1", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BRAC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::ClusterRevision::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute constraints : FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, + BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, + BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_BOOL_2_1Suite : public TestCommand +{ +public: + Test_TC_BOOL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_1", 2, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BOOL_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("stateValue", value, 0)); + VerifyOrReturn(CheckConstraintType("value", "", "bool")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read mandatory non-global attribute: StateValue"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::StateValue::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_BRAC_1_1Suite : public TestCommand +{ +public: + Test_TC_BRAC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BRAC_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BRAC_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -10579,420 +10043,289 @@ class Test_TC_BINFO_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Query Data Model Revision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::DataModelRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Query Vendor Name"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::VendorName::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Query VendorID"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::VendorID::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Query Product Name"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductName::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Query ProductID"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductID::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Query Node Label"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Query User Location"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Query HardwareVersion"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Query HardwareVersionString"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "TH reads SoftwareVersionString from the DUT and Verify it is of type string and verify the format"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "TH reads ManufacturingDate from the DUT and Verify it is of type string and verify the format"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Query PartNumber"); - VerifyOrDo(!ShouldSkip("PART_NUM"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "TH reads ProductURL from the DUT and Verify it is of type string and verify the format"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Query ProductLabel"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Query SerialNumber"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id, true, - chip::NullOptional); - } - case 16: { - LogStep(16, "Query LocalConfigDisabled"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id, true, - chip::NullOptional); - } - case 17: { - LogStep(17, "Query Reachable"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Query UniqueID"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DESC_1_1Suite : public TestCommand -{ -public: - Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DESC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 9)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_EMR_1_1Suite : public TestCommand -{ -public: - Test_TC_EMR_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_EMR_1_1", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_EMR_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectricalMeasurement::Id, - ElectricalMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(1, "Query Data Model Revision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::DataModelRevision::Id, true, + chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectricalMeasurement::Id, - ElectricalMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(2, "Query Vendor Name"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::VendorName::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, "write the default values to mandatory global attribute: ClusterRevision"); + LogStep(3, "Query VendorID"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::VendorID::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Query Product Name"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductName::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Query ProductID"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductID::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Query Node Label"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, "Query User Location"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Query HardwareVersion"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Query HardwareVersionString"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "TH reads SoftwareVersionString from the DUT and Verify it is of type string and verify the format"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - uint16_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ElectricalMeasurement::Id, - ElectricalMeasurement::Attributes::ClusterRevision::Id, value, chip::NullOptional, - chip::NullOptional); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "TH reads ManufacturingDate from the DUT and Verify it is of type string and verify the format"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "Query PartNumber"); + VerifyOrDo(!ShouldSkip("PART_NUM"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id, true, + chip::NullOptional); + } + case 13: { + LogStep(13, "TH reads ProductURL from the DUT and Verify it is of type string and verify the format"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "Query ProductLabel"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, "Query SerialNumber"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id, true, + chip::NullOptional); + } + case 16: { + LogStep(16, "Query LocalConfigDisabled"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "Query Reachable"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, true, + chip::NullOptional); + } + case 18: { + LogStep(18, "Query UniqueID"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DESC_1_1Suite : public TestCommand +{ +public: + Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 7, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DESC_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 9)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 4: { - LogStep(4, "reads back global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectricalMeasurement::Id, - ElectricalMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(4, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ElectricalMeasurement::Id, - ElectricalMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(5, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -21192,7 +20525,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckConstraintType("value", "", "map8")); } break; case 3: @@ -21234,12 +20567,6 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); - } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; @@ -21248,10 +20575,6 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; @@ -21497,11 +20820,11 @@ class Test_TC_MF_1_3Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -30839,11 +30162,11 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand } }; -class Test_TC_DIAG_TH_NW_1_1Suite : public TestCommand +class Test_TC_DIAG_TH_NW_2_1Suite : public TestCommand { public: - Test_TC_DIAG_TH_NW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_TH_NW_1_1", 3, credsIssuerConfig) + Test_TC_DIAG_TH_NW_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_2_1", 68, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30851,100 +30174,7 @@ class Test_TC_DIAG_TH_NW_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DIAG_TH_NW_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint64_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("overrunCount", value, 0ULL)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Sends ResetCounts command"); - ListFreer listFreer; - chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Commands::ResetCounts::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Read the Overruncount attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DIAG_TH_NW_1_2Suite : public TestCommand -{ -public: - Test_TC_DIAG_TH_NW_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_TH_NW_1_2", 68, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DIAG_TH_NW_1_2Suite() {} + ~Test_TC_DIAG_TH_NW_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -32477,6 +31707,99 @@ class Test_TC_DIAG_TH_NW_2_3Suite : public TestCommand } }; +class Test_TC_DIAG_TH_NW_2_4Suite : public TestCommand +{ +public: + Test_TC_DIAG_TH_NW_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_2_4", 3, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DIAG_TH_NW_2_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("overrunCount", value, 0ULL)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Sends ResetCounts command"); + ListFreer listFreer; + chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Commands::ResetCounts::Id, value, chip::NullOptional + + ); + } + case 2: { + LogStep(2, "Read the Overruncount attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_ULABEL_1_1Suite : public TestCommand { public: @@ -64128,8 +63451,7 @@ class Test_TC_DD_1_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64184,8 +63506,7 @@ class Test_TC_DD_1_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64240,8 +63561,7 @@ class Test_TC_DD_1_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64296,8 +63616,7 @@ class Test_TC_DD_1_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64352,8 +63671,7 @@ class Test_TC_DD_1_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64408,8 +63726,7 @@ class Test_TC_DD_1_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64464,8 +63781,7 @@ class Test_TC_DD_1_11Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64520,8 +63836,7 @@ class Test_TC_DD_1_12Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64576,124 +63891,121 @@ class Test_TC_DD_1_13Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DD_1_14Suite : public TestCommand +{ +public: + Test_TC_DD_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_14", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DD_1_14Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) { + ContinueOnChipMainThread(CHIP_NO_ERROR); } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DD_1_15Suite : public TestCommand +{ +public: + Test_TC_DD_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_15", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DD_1_15Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; -class Test_TC_DD_1_14Suite : public TestCommand -{ -public: - Test_TC_DD_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_14", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_14Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DD_1_15Suite : public TestCommand -{ -public: - Test_TC_DD_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_15", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DD_1_15Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DD_2_1Suite : public TestCommand { public: @@ -64744,8 +64056,7 @@ class Test_TC_DD_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64800,8 +64111,7 @@ class Test_TC_DD_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64856,8 +64166,7 @@ class Test_TC_DD_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64912,8 +64221,7 @@ class Test_TC_DD_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -64968,8 +64276,7 @@ class Test_TC_DD_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65024,8 +64331,7 @@ class Test_TC_DD_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65080,8 +64386,7 @@ class Test_TC_DD_3_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65136,8 +64441,7 @@ class Test_TC_DD_3_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65192,8 +64496,7 @@ class Test_TC_DD_3_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65248,8 +64551,7 @@ class Test_TC_DD_3_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65304,8 +64606,7 @@ class Test_TC_DD_3_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65360,8 +64661,7 @@ class Test_TC_DD_3_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65416,8 +64716,7 @@ class Test_TC_DD_3_11Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65472,8 +64771,7 @@ class Test_TC_DD_3_12Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65528,8 +64826,7 @@ class Test_TC_DD_3_13Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65584,8 +64881,7 @@ class Test_TC_DD_3_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65640,8 +64936,7 @@ class Test_TC_DD_3_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65696,8 +64991,7 @@ class Test_TC_DD_3_16Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65752,8 +65046,7 @@ class Test_TC_DD_3_17Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65808,8 +65101,7 @@ class Test_TC_DD_3_18Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65864,8 +65156,7 @@ class Test_TC_DD_3_19Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -65920,8 +65211,7 @@ class Test_TC_DD_3_20Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66429,8 +65719,7 @@ class Test_TC_GR_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66485,8 +65774,7 @@ class Test_TC_GR_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66541,8 +65829,7 @@ class Test_TC_GR_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66597,8 +65884,7 @@ class Test_TC_GR_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66653,8 +65939,7 @@ class Test_TC_GR_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66709,8 +65994,7 @@ class Test_TC_GR_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66765,8 +66049,7 @@ class Test_TC_BDX_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66821,8 +66104,7 @@ class Test_TC_BDX_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66877,8 +66159,7 @@ class Test_TC_BDX_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66933,8 +66214,7 @@ class Test_TC_BDX_1_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -66989,8 +66269,7 @@ class Test_TC_BDX_1_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67045,8 +66324,7 @@ class Test_TC_BDX_1_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67101,8 +66379,7 @@ class Test_TC_BDX_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67157,8 +66434,7 @@ class Test_TC_BDX_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67213,8 +66489,7 @@ class Test_TC_BDX_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67269,8 +66544,7 @@ class Test_TC_BDX_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67325,8 +66599,7 @@ class Test_TC_BDX_2_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67381,8 +66654,7 @@ class Test_TC_BR_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67437,8 +66709,7 @@ class Test_TC_BR_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67493,8 +66764,7 @@ class Test_TC_BR_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67549,8 +66819,7 @@ class Test_TC_BRAC_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67605,8 +66874,7 @@ class Test_TC_BRAC_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67661,8 +66929,7 @@ class Test_TC_BRAC_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67717,8 +66984,7 @@ class Test_TC_DA_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67773,8 +67039,7 @@ class Test_TC_DA_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67829,8 +67094,7 @@ class Test_TC_DA_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67885,8 +67149,7 @@ class Test_TC_DA_1_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67941,8 +67204,7 @@ class Test_TC_DA_1_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -67997,8 +67259,7 @@ class Test_TC_DA_1_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68053,8 +67314,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68110,8 +67370,7 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68166,8 +67425,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68428,8 +67686,7 @@ class Test_TC_BINFO_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68485,8 +67742,7 @@ class Test_TC_OPCREDS_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68542,8 +67798,7 @@ class Test_TC_OPCREDS_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68599,65 +67854,63 @@ class Test_TC_OPCREDS_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_OPCREDS_3_4Suite : public TestCommand +{ +public: + Test_TC_OPCREDS_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_4", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OPCREDS_3_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) { + ContinueOnChipMainThread(CHIP_NO_ERROR); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OPCREDS_3_4Suite : public TestCommand -{ -public: - Test_TC_OPCREDS_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OPCREDS_3_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; @@ -68712,8 +67965,7 @@ class Test_TC_CNET_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68768,8 +68020,7 @@ class Test_TC_CNET_4_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68824,8 +68075,7 @@ class Test_TC_CNET_4_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68880,8 +68130,7 @@ class Test_TC_CNET_4_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68936,8 +68185,7 @@ class Test_TC_CNET_4_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -68992,8 +68240,7 @@ class Test_TC_CNET_4_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69048,8 +68295,7 @@ class Test_TC_CNET_4_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69104,8 +68350,7 @@ class Test_TC_CNET_4_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69160,8 +68405,7 @@ class Test_TC_CNET_4_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69216,8 +68460,7 @@ class Test_TC_CNET_4_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69272,8 +68515,7 @@ class Test_TC_CNET_4_11Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69328,8 +68570,7 @@ class Test_TC_CNET_4_12Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69384,8 +68625,7 @@ class Test_TC_CNET_4_13Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69440,8 +68680,7 @@ class Test_TC_CNET_4_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69496,8 +68735,7 @@ class Test_TC_CNET_4_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69552,8 +68790,7 @@ class Test_TC_CNET_4_16Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69608,8 +68845,7 @@ class Test_TC_CNET_4_17Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69664,8 +68900,7 @@ class Test_TC_CNET_4_18Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69720,8 +68955,7 @@ class Test_TC_CNET_4_19Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69776,8 +69010,7 @@ class Test_TC_CNET_4_20Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69832,8 +69065,7 @@ class Test_TC_CNET_4_21Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -69888,16 +69120,180 @@ class Test_TC_DLOG_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DLOG_2_1Suite : public TestCommand +{ +public: + Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DLOG_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DLOG_2_2Suite : public TestCommand +{ +public: + Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DLOG_2_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DLOG_3_1Suite : public TestCommand +{ +public: + Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DLOG_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; -class Test_TC_DLOG_2_1Suite : public TestCommand +class Test_TC_DESC_2_1Suite : public TestCommand { public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) + Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69905,7 +69301,7 @@ class Test_TC_DLOG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_1Suite() {} + ~Test_TC_DESC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69944,16 +69340,15 @@ class Test_TC_DLOG_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DLOG_2_2Suite : public TestCommand +class Test_TC_DESC_2_2Suite : public TestCommand { public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) + Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69961,7 +69356,7 @@ class Test_TC_DLOG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_2Suite() {} + ~Test_TC_DESC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70000,16 +69395,15 @@ class Test_TC_DLOG_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DLOG_3_1Suite : public TestCommand +class Test_TC_DGETH_1_1Suite : public TestCommand { public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) + Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70017,7 +69411,7 @@ class Test_TC_DLOG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_3_1Suite() {} + ~Test_TC_DGETH_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70056,16 +69450,15 @@ class Test_TC_DLOG_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DESC_2_1Suite : public TestCommand +class Test_TC_DGETH_3_1Suite : public TestCommand { public: - Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) + Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70073,7 +69466,7 @@ class Test_TC_DESC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_1Suite() {} + ~Test_TC_DGETH_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70112,16 +69505,15 @@ class Test_TC_DESC_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DESC_2_2Suite : public TestCommand +class Test_TC_DGETH_3_2Suite : public TestCommand { public: - Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) + Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70129,7 +69521,7 @@ class Test_TC_DESC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2Suite() {} + ~Test_TC_DGETH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70168,16 +69560,15 @@ class Test_TC_DESC_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DGETH_1_1Suite : public TestCommand +class Test_TC_CGEN_2_2Suite : public TestCommand { public: - Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 0, credsIssuerConfig) + Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70185,7 +69576,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_1_1Suite() {} + ~Test_TC_CGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70224,16 +69615,15 @@ class Test_TC_DGETH_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DGETH_3_1Suite : public TestCommand +class Test_TC_CGEN_2_3Suite : public TestCommand { public: - Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) + Test_TC_CGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70241,7 +69631,7 @@ class Test_TC_DGETH_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1Suite() {} + ~Test_TC_CGEN_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70280,16 +69670,15 @@ class Test_TC_DGETH_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DGETH_3_2Suite : public TestCommand +class Test_TC_CGEN_2_4Suite : public TestCommand { public: - Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) + Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70297,7 +69686,7 @@ class Test_TC_DGETH_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_2Suite() {} + ~Test_TC_CGEN_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70336,16 +69725,15 @@ class Test_TC_DGETH_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_CGEN_2_2Suite : public TestCommand +class Test_TC_DGGEN_2_2Suite : public TestCommand { public: - Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) + Test_TC_DGGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70353,7 +69741,7 @@ class Test_TC_CGEN_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_2Suite() {} + ~Test_TC_DGGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70392,16 +69780,15 @@ class Test_TC_CGEN_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_CGEN_2_3Suite : public TestCommand +class Test_TC_DGGEN_2_3Suite : public TestCommand { public: - Test_TC_CGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_3", 0, credsIssuerConfig) + Test_TC_DGGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70409,7 +69796,7 @@ class Test_TC_CGEN_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_3Suite() {} + ~Test_TC_DGGEN_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70448,16 +69835,15 @@ class Test_TC_CGEN_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_CGEN_2_4Suite : public TestCommand +class Test_TC_DGGEN_3_1Suite : public TestCommand { public: - Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) + Test_TC_DGGEN_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70465,7 +69851,7 @@ class Test_TC_CGEN_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_4Suite() {} + ~Test_TC_DGGEN_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70504,17 +69890,15 @@ class Test_TC_CGEN_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_GENDIAG_1_2Suite : public TestCommand +class Test_TC_DGGEN_3_2Suite : public TestCommand { public: - Test_TC_GENDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GENDIAG_1_2", 0, credsIssuerConfig) + Test_TC_DGGEN_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70522,7 +69906,7 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GENDIAG_1_2Suite() {} + ~Test_TC_DGGEN_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70561,8 +69945,7 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -70617,8 +70000,7 @@ class Test_TC_I_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -70673,8 +70055,7 @@ class Test_TC_I_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -70729,8 +70110,7 @@ class Test_TC_ILL_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -70785,8 +70165,7 @@ class Test_TC_ILL_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -70841,8 +70220,7 @@ class Test_TC_IDM_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -70897,8 +70275,7 @@ class Test_TC_IDM_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -70953,8 +70330,7 @@ class Test_TC_IDM_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71009,8 +70385,7 @@ class Test_TC_IDM_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71065,8 +70440,7 @@ class Test_TC_IDM_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71121,8 +70495,7 @@ class Test_TC_IDM_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71177,8 +70550,7 @@ class Test_TC_IDM_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71233,8 +70605,7 @@ class Test_TC_IDM_4_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71289,8 +70660,7 @@ class Test_TC_IDM_4_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71345,8 +70715,7 @@ class Test_TC_IDM_5_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71401,8 +70770,7 @@ class Test_TC_IDM_5_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71457,8 +70825,7 @@ class Test_TC_IDM_6_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71513,8 +70880,7 @@ class Test_TC_IDM_6_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71569,8 +70935,7 @@ class Test_TC_IDM_6_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71625,8 +70990,7 @@ class Test_TC_IDM_6_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71681,8 +71045,7 @@ class Test_TC_IDM_7_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71737,8 +71100,7 @@ class Test_TC_IDM_8_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71793,8 +71155,7 @@ class Test_TC_MC_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71849,8 +71210,7 @@ class Test_TC_MC_3_7_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71905,8 +71265,7 @@ class Test_TC_MC_3_8_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -71961,8 +71320,7 @@ class Test_TC_MC_3_9_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72017,8 +71375,7 @@ class Test_TC_MC_3_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72073,8 +71430,7 @@ class Test_TC_MC_3_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72129,8 +71485,7 @@ class Test_TC_MC_3_16Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72185,8 +71540,7 @@ class Test_TC_MC_3_17Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72241,8 +71595,7 @@ class Test_TC_MC_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72297,8 +71650,7 @@ class Test_TC_MC_5_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72353,8 +71705,7 @@ class Test_TC_MC_5_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72409,8 +71760,7 @@ class Test_TC_MC_5_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72465,8 +71815,7 @@ class Test_TC_MC_6_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72521,8 +71870,7 @@ class Test_TC_MC_6_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72577,8 +71925,7 @@ class Test_TC_MC_7_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72633,8 +71980,7 @@ class Test_TC_MC_7_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72689,8 +72035,7 @@ class Test_TC_MC_10_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72745,8 +72090,7 @@ class Test_TC_MC_10_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72801,8 +72145,7 @@ class Test_TC_MC_10_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72857,8 +72200,7 @@ class Test_TC_MC_11_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72913,8 +72255,7 @@ class Test_TC_MC_11_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -72969,8 +72310,7 @@ class Test_TC_MC_12_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73025,8 +72365,7 @@ class Test_TC_MC_12_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73081,8 +72420,7 @@ class Test_TC_MF_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73137,8 +72475,7 @@ class Test_TC_MF_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73193,8 +72530,7 @@ class Test_TC_MF_1_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73249,8 +72585,7 @@ class Test_TC_MF_1_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73305,8 +72640,7 @@ class Test_TC_MF_1_11Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73361,8 +72695,7 @@ class Test_TC_MF_1_12Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73417,8 +72750,7 @@ class Test_TC_MF_1_13Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73473,8 +72805,7 @@ class Test_TC_MF_1_14Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73529,8 +72860,7 @@ class Test_TC_MF_1_16Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73585,8 +72915,7 @@ class Test_TC_MF_1_17Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73641,8 +72970,7 @@ class Test_TC_MF_1_18Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73697,8 +73025,7 @@ class Test_TC_MF_1_19Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73753,8 +73080,7 @@ class Test_TC_MF_1_20Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73809,8 +73135,7 @@ class Test_TC_MF_1_21Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73865,8 +73190,7 @@ class Test_TC_MF_1_22Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73921,8 +73245,7 @@ class Test_TC_MF_1_23Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -73977,8 +73300,7 @@ class Test_TC_MF_1_24Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -74033,8 +73355,7 @@ class Test_TC_MF_1_25Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -74089,8 +73410,7 @@ class Test_TC_MF_1_26Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -74331,11 +73651,11 @@ class Test_TC_MF_1_28Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -74363,11 +73683,11 @@ class Test_TC_MF_1_28Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 179U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -74516,11 +73836,11 @@ class Test_TC_MF_1_5Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -74551,11 +73871,11 @@ class Test_TC_MF_1_5Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -74612,11 +73932,11 @@ class Test_TC_MF_1_5Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -75080,11 +74400,11 @@ class Test_TC_MF_1_9Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -75871,11 +75191,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -75903,11 +75223,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -75923,11 +75243,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -75955,11 +75275,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -75975,11 +75295,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -76044,8 +75364,7 @@ class Test_TC_MOD_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76100,8 +75419,7 @@ class Test_TC_MOD_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76156,8 +75474,7 @@ class Test_TC_MOD_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76212,8 +75529,7 @@ class Test_TC_MOD_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76268,8 +75584,7 @@ class Test_TC_MOD_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76324,8 +75639,7 @@ class Test_TC_MOD_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76380,16 +75694,15 @@ class Test_TC_MOD_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_SU_1_1Suite : public TestCommand +class Test_TC_MOD_3_4Suite : public TestCommand { public: - Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) + Test_TC_MOD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76397,7 +75710,7 @@ class Test_TC_SU_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_1_1Suite() {} + ~Test_TC_MOD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76436,16 +75749,15 @@ class Test_TC_SU_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_SU_2_1Suite : public TestCommand +class Test_TC_SU_1_1Suite : public TestCommand { public: - Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) + Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76453,7 +75765,7 @@ class Test_TC_SU_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_1Suite() {} + ~Test_TC_SU_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76492,16 +75804,15 @@ class Test_TC_SU_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_SU_2_2Suite : public TestCommand +class Test_TC_SU_2_1Suite : public TestCommand { public: - Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) + Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76509,7 +75820,7 @@ class Test_TC_SU_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_2Suite() {} + ~Test_TC_SU_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76548,16 +75859,15 @@ class Test_TC_SU_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_SU_2_3Suite : public TestCommand +class Test_TC_SU_2_2Suite : public TestCommand { public: - Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) + Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76565,7 +75875,7 @@ class Test_TC_SU_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_3Suite() {} + ~Test_TC_SU_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76604,16 +75914,15 @@ class Test_TC_SU_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_SU_2_4Suite : public TestCommand +class Test_TC_SU_2_3Suite : public TestCommand { public: - Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) + Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76621,7 +75930,7 @@ class Test_TC_SU_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_4Suite() {} + ~Test_TC_SU_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76660,8 +75969,62 @@ class Test_TC_SU_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SU_2_4Suite : public TestCommand +{ +public: + Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SU_2_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) { + ContinueOnChipMainThread(CHIP_NO_ERROR); } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; @@ -76716,8 +76079,7 @@ class Test_TC_SU_2_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76772,8 +76134,7 @@ class Test_TC_SU_2_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76828,8 +76189,7 @@ class Test_TC_SU_2_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76884,8 +76244,7 @@ class Test_TC_SU_2_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76940,8 +76299,7 @@ class Test_TC_SU_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -76996,8 +76354,7 @@ class Test_TC_SU_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77052,8 +76409,7 @@ class Test_TC_SU_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77108,8 +76464,7 @@ class Test_TC_SU_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77164,8 +76519,7 @@ class Test_TC_SU_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77220,8 +76574,7 @@ class Test_TC_SU_4_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77276,8 +76629,7 @@ class Test_TC_PSCFG_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77332,8 +76684,7 @@ class Test_TC_PSCFG_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77388,8 +76739,7 @@ class Test_TC_PSCFG_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77444,8 +76794,7 @@ class Test_TC_SC_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77500,8 +76849,7 @@ class Test_TC_SC_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77556,8 +76904,7 @@ class Test_TC_SC_1_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77612,8 +76959,7 @@ class Test_TC_SC_1_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77668,8 +77014,7 @@ class Test_TC_SC_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77724,8 +77069,7 @@ class Test_TC_SC_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77780,8 +77124,7 @@ class Test_TC_SC_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77836,8 +77179,7 @@ class Test_TC_SC_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77892,8 +77234,7 @@ class Test_TC_SC_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -77948,8 +77289,7 @@ class Test_TC_SC_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78004,8 +77344,7 @@ class Test_TC_SC_3_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78060,8 +77399,7 @@ class Test_TC_SC_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78116,8 +77454,7 @@ class Test_TC_SC_4_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78172,8 +77509,7 @@ class Test_TC_SC_4_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78228,8 +77564,7 @@ class Test_TC_SC_4_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78284,8 +77619,7 @@ class Test_TC_SC_4_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78340,8 +77674,7 @@ class Test_TC_SC_4_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78396,8 +77729,7 @@ class Test_TC_SC_4_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78452,8 +77784,7 @@ class Test_TC_SC_4_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78508,8 +77839,7 @@ class Test_TC_SC_4_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78564,8 +77894,7 @@ class Test_TC_SC_4_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78620,8 +77949,7 @@ class Test_TC_DGSW_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78676,8 +78004,7 @@ class Test_TC_DGSW_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78732,8 +78059,7 @@ class Test_TC_DGSW_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78788,8 +78114,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78844,8 +78169,7 @@ class Test_TC_DGWIFI_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78900,8 +78224,7 @@ class Test_TC_DGWIFI_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -78956,8 +78279,7 @@ class Test_TC_DGWIFI_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79012,8 +78334,7 @@ class Test_TC_WNCV_6_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79068,8 +78389,7 @@ class Test_TC_WNCV_7_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79234,8 +78554,7 @@ class Test_TC_FLW_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79401,8 +78720,7 @@ class Test_TC_OCC_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79457,8 +78775,7 @@ class Test_TC_OCC_2_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79513,8 +78830,7 @@ class Test_TC_OCC_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79569,8 +78885,7 @@ class Test_TC_OCC_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79625,8 +78940,7 @@ class Test_TC_PRS_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79681,8 +78995,7 @@ class Test_TC_PRS_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79737,8 +79050,7 @@ class Test_TC_PRS_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79793,8 +79105,7 @@ class Test_TC_PS_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79849,8 +79160,7 @@ class Test_TC_PS_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79905,8 +79215,7 @@ class Test_TC_BOOL_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -79961,8 +79270,7 @@ class Test_TC_BOOL_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -80017,8 +79325,7 @@ class Test_TC_CC_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -80073,8 +79380,7 @@ class Test_TC_CC_3_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -80129,8 +79435,7 @@ class Test_TC_CC_4_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -80185,8 +79490,7 @@ class Test_TC_CC_5_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -80241,8 +79545,7 @@ class Test_TC_CC_6_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -80297,8 +79600,7 @@ class Test_TC_CC_7_5Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -80353,8 +79655,7 @@ class Test_TC_CC_9_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82546,8 +81847,7 @@ class Test_TC_DLRK_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82602,8 +81902,7 @@ class Test_TC_DLRK_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82658,8 +81957,7 @@ class Test_TC_DLRK_2_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82714,8 +82012,7 @@ class Test_TC_DLRK_2_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82770,8 +82067,7 @@ class Test_TC_DLRK_2_10Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82826,8 +82122,7 @@ class Test_TC_LCFG_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82882,8 +82177,7 @@ class Test_TC_LCFG_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82938,8 +82232,7 @@ class Test_TC_LCFG_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -82994,8 +82287,7 @@ class Test_TC_LVL_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -83050,8 +82342,7 @@ class Test_TC_LVL_8_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -84926,8 +84217,7 @@ class Test_TC_OO_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -84982,8 +84272,7 @@ class Test_TC_OO_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -85183,8 +84472,7 @@ class Test_TC_RH_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -85239,8 +84527,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -85295,16 +84582,70 @@ class Test_TC_SWTCH_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SWTCH_3_1Suite : public TestCommand +{ +public: + Test_TC_SWTCH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SWTCH_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; -class Test_TC_SWTCH_3_1Suite : public TestCommand +class Test_TC_SWTCH_3_2Suite : public TestCommand { public: - Test_TC_SWTCH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_1", 0, credsIssuerConfig) + Test_TC_SWTCH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -85312,7 +84653,7 @@ class Test_TC_SWTCH_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SWTCH_3_1Suite() {} + ~Test_TC_SWTCH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -85351,8 +84692,7 @@ class Test_TC_SWTCH_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -85549,8 +84889,7 @@ class Test_TC_TM_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -85605,8 +84944,7 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -85661,8 +84999,7 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -85717,17 +85054,16 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DIAG_TH_NW_2_6Suite : public TestCommand +class Test_TC_DIAG_TH_NW_1_1Suite : public TestCommand { public: - Test_TC_DIAG_TH_NW_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_TH_NW_2_6", 0, credsIssuerConfig) + Test_TC_DIAG_TH_NW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -85735,7 +85071,7 @@ class Test_TC_DIAG_TH_NW_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DIAG_TH_NW_2_6Suite() {} + ~Test_TC_DIAG_TH_NW_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -85774,17 +85110,16 @@ class Test_TC_DIAG_TH_NW_2_6Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DIAG_TH_NW_2_7Suite : public TestCommand +class Test_TC_DIAG_TH_NW_2_5Suite : public TestCommand { public: - Test_TC_DIAG_TH_NW_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_TH_NW_2_7", 0, credsIssuerConfig) + Test_TC_DIAG_TH_NW_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -85792,7 +85127,7 @@ class Test_TC_DIAG_TH_NW_2_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DIAG_TH_NW_2_7Suite() {} + ~Test_TC_DIAG_TH_NW_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -85831,17 +85166,72 @@ class Test_TC_DIAG_TH_NW_2_7Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DIAG_TH_NW_3_1Suite : public TestCommand +{ +public: + Test_TC_DIAG_TH_NW_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DIAG_TH_NW_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) { + ContinueOnChipMainThread(CHIP_NO_ERROR); } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; -class Test_TC_DIAG_TH_NW_2_8Suite : public TestCommand +class Test_TC_DIAG_TH_NW_3_2Suite : public TestCommand { public: - Test_TC_DIAG_TH_NW_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_TH_NW_2_8", 0, credsIssuerConfig) + Test_TC_DIAG_TH_NW_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -85849,7 +85239,7 @@ class Test_TC_DIAG_TH_NW_2_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DIAG_TH_NW_2_8Suite() {} + ~Test_TC_DIAG_TH_NW_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -85888,17 +85278,72 @@ class Test_TC_DIAG_TH_NW_2_8Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DIAG_TH_NW_3_3Suite : public TestCommand +{ +public: + Test_TC_DIAG_TH_NW_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_3_3", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DIAG_TH_NW_3_3Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) { + ContinueOnChipMainThread(CHIP_NO_ERROR); } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; -class Test_TC_DIAG_TH_NW_2_9Suite : public TestCommand +class Test_TC_DIAG_TH_NW_3_4Suite : public TestCommand { public: - Test_TC_DIAG_TH_NW_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_TH_NW_2_9", 0, credsIssuerConfig) + Test_TC_DIAG_TH_NW_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -85906,7 +85351,7 @@ class Test_TC_DIAG_TH_NW_2_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DIAG_TH_NW_2_9Suite() {} + ~Test_TC_DIAG_TH_NW_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -85945,8 +85390,63 @@ class Test_TC_DIAG_TH_NW_2_9Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DIAG_TH_NW_3_5Suite : public TestCommand +{ +public: + Test_TC_DIAG_TH_NW_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_3_5", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DIAG_TH_NW_3_5Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) { + ContinueOnChipMainThread(CHIP_NO_ERROR); } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; @@ -86001,8 +85501,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86057,8 +85556,7 @@ class Test_TC_ACT_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86113,8 +85611,7 @@ class Test_TC_ACT_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86169,8 +85666,7 @@ class Test_TC_ACT_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86225,8 +85721,7 @@ class Test_TC_TFL_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86281,8 +85776,7 @@ class Test_TC_TFL_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86337,8 +85831,7 @@ class Test_TC_TFL_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86393,8 +85886,7 @@ class Test_TC_TFL_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86449,8 +85941,7 @@ class Test_TC_UL_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86505,8 +85996,7 @@ class Test_TC_UL_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86561,8 +86051,7 @@ class Test_TC_UL_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86617,8 +86106,7 @@ class Test_TC_UL_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86673,8 +86161,7 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86729,8 +86216,7 @@ class Test_TC_FLABEL_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86785,8 +86271,7 @@ class Test_TC_FLABEL_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86841,8 +86326,7 @@ class Test_TC_BIND_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86897,8 +86381,7 @@ class Test_TC_BIND_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -86953,8 +86436,7 @@ class Test_TC_S_1_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -87009,8 +86491,7 @@ class Test_TC_S_2_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -87065,8 +86546,7 @@ class Test_TC_S_2_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -87121,8 +86601,7 @@ class Test_TC_S_2_3Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - } + {} return CHIP_NO_ERROR; } }; @@ -87177,8 +86656,62 @@ class Test_TC_S_3_1Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_PCC_3_1Suite : public TestCommand +{ +public: + Test_TC_PCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_PCC_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) { + ContinueOnChipMainThread(CHIP_NO_ERROR); } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} return CHIP_NO_ERROR; } }; @@ -87194,9 +86727,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(), make_unique(), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87222,7 +86752,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87312,10 +86841,10 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87495,7 +87024,10 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87573,6 +87105,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87663,15 +87196,19 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87694,6 +87231,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), #endif // CONFIG_ENABLE_YAML_TESTS }; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 6cb4cad30f8dc2..8f95cd264ac7ca 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -34,9 +34,6 @@ class TestList : public Command { CHIP_ERROR Run() override { printf("TestAccessControlCluster\n"); - printf("Test_TC_BI_1_1\n"); - printf("Test_TC_BI_2_1\n"); - printf("Test_TC_BI_2_2\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); printf("Test_TC_BRAC_1_1\n"); @@ -62,7 +59,6 @@ class TestList : public Command { printf("Test_TC_CC_8_1\n"); printf("Test_TC_BINFO_2_1\n"); printf("Test_TC_DESC_1_1\n"); - printf("Test_TC_EMR_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); printf("Test_TC_FLW_1_1\n"); @@ -2016,1032 +2012,6 @@ class TestAccessControlCluster : public TestCommandBridge { } }; -class Test_TC_BI_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_BI_1_1() - : TestCommandBridge("Test_TC_BI_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_BI_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute : FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeEventList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeEventList_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BI_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_BI_2_1() - : TestCommandBridge("Test_TC_BI_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_BI_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read mandatory non-global attribute: OutOfService\n"); - err = TestReadMandatoryNonGlobalAttributeOutOfService_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read mandatory non-global attribute constraints: OutOfService\n"); - err = TestReadMandatoryNonGlobalAttributeConstraintsOutOfService_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Write the default values to mandatory non-global attribute: OutOfService\n"); - err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeOutOfService_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back the mandatory non-global attribute: OutOfService\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributeOutOfService_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read mandatory non-global attribute constraints: PresentValue\n"); - err = TestReadMandatoryNonGlobalAttributeConstraintsPresentValue_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Write the default values to mandatory non-global attribute: PresentValue\n"); - err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributePresentValue_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads back the mandatory non-global attribute: PresentValue\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributePresentValue_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read mandatory non-global attribute: StatusFlags\n"); - err = TestReadMandatoryNonGlobalAttributeStatusFlags_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read mandatory non-global attribute constraints: StatusFlags\n"); - err = TestReadMandatoryNonGlobalAttributeConstraintsStatusFlags_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Write the default values to mandatory non-global attribute: StatusFlags\n"); - err = TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeStatusFlags_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads back the mandatory non-global attribute: StatusFlags\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributeStatusFlags_11(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadMandatoryNonGlobalAttributeOutOfService_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOutOfServiceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read mandatory non-global attribute: OutOfService Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("out of service", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsOutOfService_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOutOfServiceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read mandatory non-global attribute constraints: OutOfService Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("outOfService", "", "bool")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeOutOfService_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id outOfServiceArgument; - outOfServiceArgument = [NSNumber numberWithBool:0]; - [cluster - writeAttributeOutOfServiceWithValue:outOfServiceArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory non-global attribute: OutOfService Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeOutOfService_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOutOfServiceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back the mandatory non-global attribute: OutOfService Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("out of service", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsPresentValue_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePresentValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read mandatory non-global attribute constraints: PresentValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("presentValue", "", "bool")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributePresentValue_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id presentValueArgument; - presentValueArgument = [NSNumber numberWithBool:0]; - [cluster - writeAttributePresentValueWithValue:presentValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory non-global attribute: PresentValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributePresentValue_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePresentValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back the mandatory non-global attribute: PresentValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("present value", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadMandatoryNonGlobalAttributeStatusFlags_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read mandatory non-global attribute: StatusFlags Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsStatusFlags_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read mandatory non-global attribute constraints: StatusFlags Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("statusFlags", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("statusFlags", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("statusFlags", [value unsignedCharValue], 15U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeStatusFlags_10() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id statusFlagsArgument; - statusFlagsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster - writeAttributeStatusFlagsWithValue:statusFlagsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory non-global attribute: StatusFlags Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeStatusFlags_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back the mandatory non-global attribute: StatusFlags Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BI_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_BI_2_2() - : TestCommandBridge("Test_TC_BI_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_BI_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads PresentValue attribute from DUT\n"); - if (ShouldSkip("A_PRESENTVALUE")) { - NextTest(); - return; - } - err = TestReadsPresentValueAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads OutOfService attribute from DUT\n"); - if (ShouldSkip("A_OUTOFSERVICE")) { - NextTest(); - return; - } - err = TestReadsOutOfServiceAttributeFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads StatusFlags attribute from DUT\n"); - if (ShouldSkip("A_STATUSFLAGS")) { - NextTest(); - return; - } - err = TestReadsStatusFlagsAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads PresentValue attribute from DUT\n"); - if (ShouldSkip("A_PRESENTVALUE")) { - NextTest(); - return; - } - err = TestReadsPresentValueAttributeFromDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads OutOfService attribute from DUT\n"); - if (ShouldSkip("A_OUTOFSERVICE")) { - NextTest(); - return; - } - err = TestReadsOutOfServiceAttributeFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads StatusFlags attribute from DUT\n"); - if (ShouldSkip("A_STATUSFLAGS")) { - NextTest(); - return; - } - err = TestReadsStatusFlagsAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads StatusFlags attribute from DUT\n"); - if (ShouldSkip("A_STATUSFLAGS")) { - NextTest(); - return; - } - err = TestReadsStatusFlagsAttributeFromDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads StatusFlags attribute from DUT\n"); - if (ShouldSkip("A_STATUSFLAGS")) { - NextTest(); - return; - } - err = TestReadsStatusFlagsAttributeFromDut_8(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsPresentValueAttributeFromDut_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePresentValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PresentValue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("present value", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOutOfServiceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OutOfService attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("out of service", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads StatusFlags attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsPresentValueAttributeFromDut_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePresentValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads PresentValue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("present value", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOutOfServiceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OutOfService attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("out of service", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads StatusFlags attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads StatusFlags attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads StatusFlags attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - class Test_TC_BOOL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -17468,511 +16438,42 @@ class Test_TC_BINFO_2_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestQueryDataModelRevision_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Data Model Revision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("dataModelRevision", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryVendorName_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Vendor Name Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryVendorID_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query VendorID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("vendorID", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryProductName_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Product Name Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("productName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("productName", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryProductID_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query ProductID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryNodeLabel_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Node Label Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryUserLocation_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query User Location Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("location", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("location", [value length], 16)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryHardwareVersion_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query HardwareVersion Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("hardwareVersion", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryHardwareVersionString_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query HardwareVersionString Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("hardwareVersionString", "", "string")); - VerifyOrReturn(CheckConstraintMinLength("hardwareVersionString", [value length], 1)); - VerifyOrReturn(CheckConstraintMaxLength("hardwareVersionString", [value length], 64)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsSoftwareVersionStringFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_10() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsManufacturingDateFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_11() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestQueryPartNumber_12() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query PartNumber Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("partNumber", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("partNumber", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsProductURLFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_13() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestQueryProductLabel_14() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query ProductLabel Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("productLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("productLabel", [value length], 64)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQuerySerialNumber_15() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query SerialNumber Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("serialNumber", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("serialNumber", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryLocalConfigDisabled_16() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query LocalConfigDisabled Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("localConfigDisabled", "", "boolean")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryReachable_17() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Reachable Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("reachable", "", "boolean")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryUniqueID_18() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUniqueIDWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query UniqueID Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("uniqueID", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("uniqueID", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DESC_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DESC_1_1() - : TestCommandBridge("Test_TC_DESC_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_DESC_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -17986,7 +16487,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -18000,85 +16501,217 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestQueryDataModelRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Data Model Revision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("dataModelRevision", "", "uint16")); + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQueryVendorName_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Vendor Name Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestQueryVendorID_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query VendorID Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } + VerifyOrReturn(CheckConstraintType("vendorID", "", "uint16")); + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQueryProductName_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Product Name Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("productName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("productName", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestQueryProductID_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query ProductID Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); + VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQueryNodeLabel_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Node Label Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQueryUserLocation_7() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query User Location Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("location", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("location", [value length], 16)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQueryHardwareVersion_8() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query HardwareVersion Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("hardwareVersion", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQueryHardwareVersionString_9() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query HardwareVersionString Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("hardwareVersionString", "", "string")); + VerifyOrReturn(CheckConstraintMinLength("hardwareVersionString", [value length], 1)); + VerifyOrReturn(CheckConstraintMaxLength("hardwareVersionString", [value length], 64)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsSoftwareVersionStringFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_10() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsManufacturingDateFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_11() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestQueryPartNumber_12() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query PartNumber Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("partNumber", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("partNumber", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + CHIP_ERROR TestThReadsProductURLFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_13() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -18087,46 +16720,118 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestQueryProductLabel_14() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query ProductLabel Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckConstraintType("productLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("productLabel", [value length], 64)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQuerySerialNumber_15() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query SerialNumber Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("serialNumber", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("serialNumber", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestQueryLocalConfigDisabled_16() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query LocalConfigDisabled Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckConstraintType("localConfigDisabled", "", "boolean")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQueryReachable_17() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Reachable Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("reachable", "", "boolean")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestQueryUniqueID_18() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeUniqueIDWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query UniqueID Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("uniqueID", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("uniqueID", [value length], 32)); NextTest(); }]; @@ -18134,11 +16839,11 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { } }; -class Test_TC_EMR_1_1 : public TestCommandBridge { +class Test_TC_DESC_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_EMR_1_1() - : TestCommandBridge("Test_TC_EMR_1_1") + Test_TC_DESC_1_1() + : TestCommandBridge("Test_TC_DESC_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -18148,7 +16853,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_EMR_1_1() {} + ~Test_TC_DESC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -18156,11 +16861,11 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_EMR_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_EMR_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -18177,25 +16882,34 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -18218,7 +16932,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -18226,6 +16940,9 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -18239,7 +16956,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -18256,108 +16973,130 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -34215,7 +32954,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("featureMap", "", "map8")); NextTest(); }]; @@ -34274,12 +33013,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; @@ -34298,11 +33031,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -104665,9 +103393,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -104693,7 +103418,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(),