From 343216e28135da42220cd4ff716c1a7de7b8ca38 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 6 Jul 2022 14:34:06 +0200 Subject: [PATCH] Update generated code --- .../chip-tool/zap-generated/test/Commands.h | 203 ++++++++---- .../zap-generated/test/Commands.h | 303 ++++++++++++++---- 2 files changed, 382 insertions(+), 124 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index c3bd19a940089b..6ca1dc5b781b67 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -46449,7 +46449,7 @@ class TestClusterComplexTypesSuite : public TestCommand class TestConstraintsSuite : public TestCommand { public: - TestConstraintsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestConstraints", 26, credsIssuerConfig) + TestConstraintsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestConstraints", 32, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -46513,8 +46513,56 @@ class TestConstraintsSuite : public TestCommand break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("bitmap32", value, 0UL)); + } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("bitmap32", value, 5UL)); + VerifyOrReturn(CheckConstraintHasMasksClear("value", value, 2UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("bitmap32", value, 5UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("bitmap32", value, 5UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::BitMask value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("bitmap32", value, 5UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -46522,7 +46570,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintMinValue("value", value, 5UL)); } break; - case 7: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -46530,7 +46578,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 5UL)); } break; - case 8: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -46538,13 +46586,13 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintNotValue("value", value, 6UL)); } break; - case 9: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46552,7 +46600,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintMinLength("value", value.size(), 5)); } break; - case 12: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46560,7 +46608,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 20)); } break; - case 13: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46568,7 +46616,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintStartsWith("value", value, "**")); } break; - case 14: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46576,10 +46624,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintEndsWith("value", value, "**")); } break; - case 15: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46588,10 +46636,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsLowerCase("value", value, true)); } break; - case 17: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46600,10 +46648,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsLowerCase("value", value, false)); } break; - case 19: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46612,10 +46660,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsLowerCase("value", value, false)); } break; - case 21: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46623,10 +46671,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsHexString("value", value, false)); } break; - case 23: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 24: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -46634,7 +46682,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsHexString("value", value, true)); } break; - case 25: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -46696,131 +46744,164 @@ class TestConstraintsSuite : public TestCommand chip::NullOptional, chip::NullOptional); } case 5: { - LogStep(5, "Write attribute INT32U Value"); + LogStep(5, "Read attribute BITMAP32 Default Value"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Write attribute BITMAP32 with MaskVal1 and MaskVal3"); + ListFreer listFreer; + chip::BitMask value; + value = static_cast>(5UL); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 7: { + LogStep(7, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal2 is not set"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal1 is set"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal3 is set"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure Maskval1 and MaskVal3 are set"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, true, + chip::NullOptional); + } + case 11: { + LogStep(11, "Write attribute INT32U Value"); ListFreer listFreer; uint32_t value; value = 5UL; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, value, chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "Read attribute INT32U Value MinValue Constraints"); + case 12: { + LogStep(12, "Read attribute INT32U Value MinValue Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read attribute INT32U Value MaxValue Constraints"); + case 13: { + LogStep(13, "Read attribute INT32U Value MaxValue Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read attribute INT32U Value NotValue Constraints"); + case 14: { + LogStep(14, "Read attribute INT32U Value NotValue Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Write attribute INT32U Value Back to Default Value"); + case 15: { + LogStep(15, "Write attribute INT32U Value Back to Default Value"); ListFreer listFreer; uint32_t value; value = 0UL; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, value, chip::NullOptional, chip::NullOptional); } - case 10: { - LogStep(10, "Write attribute CHAR_STRING Value"); + case 16: { + LogStep(16, "Write attribute CHAR_STRING Value"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("** Test **garbage: not in length on purpose", 10); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "Read attribute CHAR_STRING Value MinLength Constraints"); + case 17: { + LogStep(17, "Read attribute CHAR_STRING Value MinLength Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Read attribute CHAR_STRING Value MaxLength Constraints"); + case 18: { + LogStep(18, "Read attribute CHAR_STRING Value MaxLength Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Read attribute CHAR_STRING Value StartsWith Constraints"); + case 19: { + LogStep(19, "Read attribute CHAR_STRING Value StartsWith Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read attribute CHAR_STRING Value EndsWith Constraints"); + case 20: { + LogStep(20, "Read attribute CHAR_STRING Value EndsWith Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Write attribute CHAR_STRING Value"); + case 21: { + LogStep(21, "Write attribute CHAR_STRING Value"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("lowercasegarbage: not in length on purpose", 9); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value, chip::NullOptional, chip::NullOptional); } - case 16: { - LogStep(16, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); + case 22: { + LogStep(22, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Write attribute CHAR_STRING Value"); + case 23: { + LogStep(23, "Write attribute CHAR_STRING Value"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("UPPERCASEgarbage: not in length on purpose", 9); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value, chip::NullOptional, chip::NullOptional); } - case 18: { - LogStep(18, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); + case 24: { + LogStep(24, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Write attribute CHAR_STRING Value"); + case 25: { + LogStep(25, "Write attribute CHAR_STRING Value"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("lowUPPERgarbage: not in length on purpose", 8); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value, chip::NullOptional, chip::NullOptional); } - case 20: { - LogStep(20, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); + case 26: { + LogStep(26, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Write attribute CHAR_STRING Value"); + case 27: { + LogStep(27, "Write attribute CHAR_STRING Value"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("ABCDEF012Vgarbage: not in length on purpose", 10); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value, chip::NullOptional, chip::NullOptional); } - case 22: { - LogStep(22, "Read attribute CHAR_STRING Value isHexString Constraints"); + case 28: { + LogStep(28, "Read attribute CHAR_STRING Value isHexString Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Write attribute CHAR_STRING Value"); + case 29: { + LogStep(29, "Write attribute CHAR_STRING Value"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("ABCDEF0123garbage: not in length on purpose", 10); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, value, chip::NullOptional, chip::NullOptional); } - case 24: { - LogStep(24, "Read attribute CHAR_STRING Value isHexString Constraints"); + case 30: { + LogStep(30, "Read attribute CHAR_STRING Value isHexString Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Write attribute CHAR_STRING Value Back to Default Value"); + case 31: { + LogStep(31, "Write attribute CHAR_STRING Value Back to Default Value"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("garbage: not in length on purpose", 0); 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 4d498a43c0ef49..9c09f3661edf46 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -76961,91 +76961,120 @@ class TestConstraints : public TestCommandBridge { err = TestWriteAttributeListBackToDefaultValue_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write attribute INT32U Value\n"); - err = TestWriteAttributeInt32uValue_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read attribute BITMAP32 Default Value\n"); + err = TestReadAttributeBitmap32DefaultValue_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute INT32U Value MinValue Constraints\n"); - err = TestReadAttributeInt32uValueMinValueConstraints_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Write attribute BITMAP32 with MaskVal1 and MaskVal3\n"); + err = TestWriteAttributeBitmap32WithMaskVal1AndMaskVal3_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute INT32U Value MaxValue Constraints\n"); - err = TestReadAttributeInt32uValueMaxValueConstraints_7(); + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal2 is not set\n"); + err = TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal2IsNotSet_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute INT32U Value NotValue Constraints\n"); - err = TestReadAttributeInt32uValueNotValueConstraints_8(); + ChipLogProgress( + chipTool, " ***** Test Step 8 : Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal1 is set\n"); + err = TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal1IsSet_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Write attribute INT32U Value Back to Default Value\n"); - err = TestWriteAttributeInt32uValueBackToDefaultValue_9(); + ChipLogProgress( + chipTool, " ***** Test Step 9 : Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal3 is set\n"); + err = TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal3IsSet_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_10(); + ChipLogProgress(chipTool, + " ***** Test Step 10 : Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure Maskval1 and MaskVal3 are " + "set\n"); + err = TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskval1AndMaskVal3AreSet_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute CHAR_STRING Value MinLength Constraints\n"); - err = TestReadAttributeCharStringValueMinLengthConstraints_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute INT32U Value\n"); + err = TestWriteAttributeInt32uValue_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read attribute CHAR_STRING Value MaxLength Constraints\n"); - err = TestReadAttributeCharStringValueMaxLengthConstraints_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Read attribute INT32U Value MinValue Constraints\n"); + err = TestReadAttributeInt32uValueMinValueConstraints_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute CHAR_STRING Value StartsWith Constraints\n"); - err = TestReadAttributeCharStringValueStartsWithConstraints_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute INT32U Value MaxValue Constraints\n"); + err = TestReadAttributeInt32uValueMaxValueConstraints_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read attribute CHAR_STRING Value EndsWith Constraints\n"); - err = TestReadAttributeCharStringValueEndsWithConstraints_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Read attribute INT32U Value NotValue Constraints\n"); + err = TestReadAttributeInt32uValueNotValueConstraints_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute INT32U Value Back to Default Value\n"); + err = TestWriteAttributeInt32uValueBackToDefaultValue_15(); break; case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); - err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Read attribute CHAR_STRING Value MinLength Constraints\n"); + err = TestReadAttributeCharStringValueMinLengthConstraints_17(); break; case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); - err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute CHAR_STRING Value MaxLength Constraints\n"); + err = TestReadAttributeCharStringValueMaxLengthConstraints_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Read attribute CHAR_STRING Value StartsWith Constraints\n"); + err = TestReadAttributeCharStringValueStartsWithConstraints_19(); break; case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); - err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute CHAR_STRING Value EndsWith Constraints\n"); + err = TestReadAttributeCharStringValueEndsWithConstraints_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute CHAR_STRING Value\n"); err = TestWriteAttributeCharStringValue_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Read attribute CHAR_STRING Value isHexString Constraints\n"); - err = TestReadAttributeCharStringValueIsHexStringConstraints_22(); + ChipLogProgress( + chipTool, " ***** Test Step 22 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_22(); break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Write attribute CHAR_STRING Value\n"); err = TestWriteAttributeCharStringValue_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read attribute CHAR_STRING Value isHexString Constraints\n"); - err = TestReadAttributeCharStringValueIsHexStringConstraints_24(); + ChipLogProgress( + chipTool, " ***** Test Step 24 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Write attribute CHAR_STRING Value Back to Default Value\n"); - err = TestWriteAttributeCharStringValueBackToDefaultValue_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_25(); + break; + case 26: + ChipLogProgress( + chipTool, " ***** Test Step 26 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute CHAR_STRING Value isHexString Constraints\n"); + err = TestReadAttributeCharStringValueIsHexStringConstraints_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Read attribute CHAR_STRING Value isHexString Constraints\n"); + err = TestReadAttributeCharStringValueIsHexStringConstraints_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Write attribute CHAR_STRING Value Back to Default Value\n"); + err = TestWriteAttributeCharStringValueBackToDefaultValue_31(); break; } @@ -77136,6 +77165,24 @@ class TestConstraints : public TestCommandBridge { case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -77149,7 +77196,7 @@ class TestConstraints : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; + const uint16_t mTestCount = 32; chip::Optional mNodeId; chip::Optional mCluster; @@ -77254,7 +77301,137 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt32uValue_5() + CHIP_ERROR TestReadAttributeBitmap32DefaultValue_5() + { + MTRDevice * device = GetDevice("alpha"); + MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap32", actualValue, 0UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeBitmap32WithMaskVal1AndMaskVal3_6() + { + MTRDevice * device = GetDevice("alpha"); + MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id bitmap32Argument; + bitmap32Argument = [NSNumber numberWithUnsignedInt:5UL]; + [cluster writeAttributeBitmap32WithValue:bitmap32Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP32 with MaskVal1 and MaskVal3 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal2IsNotSet_7() + { + MTRDevice * device = GetDevice("alpha"); + MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal2 is not set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap32", actualValue, 5UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal1IsSet_8() + { + MTRDevice * device = GetDevice("alpha"); + MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal1 is set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap32", actualValue, 5UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskVal3IsSet_9() + { + MTRDevice * device = GetDevice("alpha"); + MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal3 is set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap32", actualValue, 5UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeBitmap32WithMaskVal1AndMaskVal3AndEnsureMaskval1AndMaskVal3AreSet_10() + { + MTRDevice * device = GetDevice("alpha"); + MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure Maskval1 and MaskVal3 are set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("bitmap32", actualValue, 5UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeInt32uValue_11() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77274,7 +77451,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_6() + CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_12() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77293,7 +77470,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_7() + CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_13() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77312,7 +77489,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_8() + CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_14() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77331,7 +77508,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_9() + CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_15() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77351,7 +77528,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_10() + CHIP_ERROR TestWriteAttributeCharStringValue_16() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77371,7 +77548,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_11() + CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_17() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77389,7 +77566,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_12() + CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_18() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77407,7 +77584,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_13() + CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_19() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77425,7 +77602,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_14() + CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_20() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77443,7 +77620,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_15() + CHIP_ERROR TestWriteAttributeCharStringValue_21() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77463,7 +77640,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16() + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_22() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77482,7 +77659,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_17() + CHIP_ERROR TestWriteAttributeCharStringValue_23() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77502,7 +77679,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_18() + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_24() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77521,7 +77698,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_19() + CHIP_ERROR TestWriteAttributeCharStringValue_25() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77541,7 +77718,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_20() + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_26() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77560,7 +77737,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_21() + CHIP_ERROR TestWriteAttributeCharStringValue_27() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77580,7 +77757,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_22() + CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_28() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77598,7 +77775,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_23() + CHIP_ERROR TestWriteAttributeCharStringValue_29() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77618,7 +77795,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_24() + CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_30() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -77636,7 +77813,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_25() + CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_31() { MTRDevice * device = GetDevice("alpha"); MTRTestTestCluster * cluster = [[MTRTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue];