diff --git a/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt b/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt index 811f4f3a8d8fc3..b7a574e380173a 100644 --- a/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt +++ b/examples/chip-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt @@ -28,6 +28,18 @@ {{~#if (hasProperty expectedConstraints "maxValue")}}VerifyOrReturn(CheckConstraintMaxValue("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral expectedConstraints.maxValue type}}));{{/if}} + {{~#if (hasProperty expectedConstraints "contains")}} + {{#chip_tests_iterate_expected_list expectedConstraints.contains}} + VerifyOrReturn(CheckConstraintContains("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); + {{/chip_tests_iterate_expected_list}} + {{/if}} + + {{~#if (hasProperty expectedConstraints "excludes")}} + {{#chip_tests_iterate_expected_list expectedConstraints.excludes}} + VerifyOrReturn(CheckConstraintExcludes("{{asPropertyValue}}", {{asPropertyValue}}, {{asTypedLiteral value type}})); + {{/chip_tests_iterate_expected_list}} + {{/if}} + {{~#if (hasProperty expectedConstraints "notValue")}} {{#if (isLiteralNull expectedConstraints.notValue)}} VerifyOrReturn(CheckValueNonNull("{{asPropertyValue}}", {{asPropertyValue}})); diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h index 42c15e097f048b..e657cf9410ee25 100644 --- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h +++ b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h @@ -264,6 +264,31 @@ class TestCommandBridge : public CHIPCommandBridge, return ConstraintsChecker::CheckConstraintNotValue(itemName, currentValue, expectedValue); } + template bool CheckConstraintContains(const char * _Nonnull itemName, const NSArray * _Nonnull current, T expected) + { + for (id currentElement in current) { + if ([currentElement isEqualToNumber:@(expected)]) { + return true; + } + } + + Exit(std::string(itemName) + " expect the value " + std::to_string(expected) + " but the list does not contains it."); + return false; + } + + template bool CheckConstraintExcludes(const char * _Nonnull itemName, const NSArray * _Nonnull current, T expected) + { + for (id currentElement in current) { + if ([currentElement isEqualToNumber:@(expected)]) { + Exit(std::string(itemName) + " does not expect the value " + std::to_string(expected) + + " but the list contains it."); + return false; + } + } + + return true; + } + bool CheckConstraintNotValue(const char * _Nonnull itemName, const NSData * _Nonnull current, const NSData * _Nonnull expected) { const chip::ByteSpan currentValue(static_cast([current bytes]), [current length]); diff --git a/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt b/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt new file mode 100644 index 00000000000000..190a0fe5abae49 --- /dev/null +++ b/examples/darwin-framework-tool/templates/tests/partials/checks/maybeCheckExpectedConstraints.zapt @@ -0,0 +1,67 @@ +{{#if hasExpectedConstraints}} + {{~#*inline "item"}}{{asLowerCamelCase name}}{{/inline}} + {{#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{>item}}", "", "{{expectedConstraints.type}}"));{{/if}} + + {{~#if (hasProperty expectedConstraints "format")}}VerifyOrReturn(CheckConstraintFormat("{{>item}}", "", "{{expectedConstraints.format}}"));{{/if}} + + {{~#if (hasProperty expectedConstraints "startsWith")}}VerifyOrReturn(CheckConstraintStartsWith("{{>item}}", {{>actualValue}}, "{{expectedConstraints.startsWith}}"));{{/if}} + + {{~#if (hasProperty expectedConstraints "endsWith")}}VerifyOrReturn(CheckConstraintEndsWith("{{>item}}", {{>actualValue}}, "{{expectedConstraints.endsWith}}"));{{/if}} + + {{~#if (hasProperty expectedConstraints "isUpperCase")}}VerifyOrReturn(CheckConstraintIsUpperCase("{{>item}}", {{>actualValue}}, {{expectedConstraints.isUpperCase}}));{{/if}} + + {{~#if (hasProperty expectedConstraints "isLowerCase")}}VerifyOrReturn(CheckConstraintIsLowerCase("{{>item}}", {{>actualValue}}, {{expectedConstraints.isLowerCase}}));{{/if}} + + {{~#if (hasProperty expectedConstraints "isHexString")}}VerifyOrReturn(CheckConstraintIsHexString("{{>item}}", {{>actualValue}}, {{expectedConstraints.isHexString}}));{{/if}} + + {{~#if (hasProperty expectedConstraints "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{>item}}", [{{>actualValue}} length], {{expectedConstraints.minLength}}));{{/if}} + + {{~#if (hasProperty expectedConstraints "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{>item}}", [{{>actualValue}} length], {{expectedConstraints.maxLength}}));{{/if}} + + {{~#if (hasProperty expectedConstraints "minValue")}} + if ({{>actualValue}} != nil) + { + VerifyOrReturn(CheckConstraintMinValue<{{chipType}}>("{{>item}}", [{{>actualValue}} {{asObjectiveCNumberType "" type true}}Value], {{asTypedLiteral expectedConstraints.minValue type}})); + } + {{/if}} + + {{~#if (hasProperty expectedConstraints "maxValue")}} + if ({{>actualValue}} != nil) + { + VerifyOrReturn(CheckConstraintMaxValue<{{chipType}}>("{{>item}}", [{{>actualValue}} {{asObjectiveCNumberType "" type true}}Value], {{asTypedLiteral expectedConstraints.maxValue type}})); + } + {{/if}} + + {{~#if (hasProperty expectedConstraints "contains")}} + if ({{>actualValue}} != nil) + { + {{#chip_tests_iterate_expected_list expectedConstraints.contains}} + VerifyOrReturn(CheckConstraintContains("{{asLowerCamelCase name}}", {{>actualValue}}, {{asTypedLiteral value type}})); + {{/chip_tests_iterate_expected_list}} + } + {{/if}} + + {{~#if (hasProperty expectedConstraints "excludes")}} + if ({{>actualValue}} != nil) + { + {{#chip_tests_iterate_expected_list expectedConstraints.excludes}} + VerifyOrReturn(CheckConstraintExcludes("{{asLowerCamelCase name}}", {{>actualValue}}, {{asTypedLiteral value type}})); + {{/chip_tests_iterate_expected_list}} + } + {{/if}} + + {{~#if (hasProperty expectedConstraints "notValue")}} + {{#if (isLiteralNull expectedConstraints.notValue)}} + VerifyOrReturn(CheckValueNonNull("{{>item}}", {{>actualValue}})); + {{else}} + if ({{>actualValue}} != nil) + { + {{#if (isString type)}} + VerifyOrReturn(CheckConstraintNotValue("{{>item}}", {{>actualValue}}, {{asTypedLiteral expectedConstraints.notValue type}})); + {{else}} + VerifyOrReturn(CheckConstraintNotValue("{{>item}}", {{>actualValue}}, {{asTypedLiteral expectedConstraints.notValue type}})); + {{/if}} + } + {{/if}} + {{/if}} +{{/if}} diff --git a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt index 67a76abd765afa..77abd2f0a024b2 100644 --- a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt +++ b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt @@ -209,47 +209,13 @@ class {{filename}}: public TestCommandBridge {{>check_test_value actual="actualValue" expected=expectedValue cluster=../cluster}} } {{/if}} - {{#if hasExpectedConstraints}} - {{~#*inline "item"}}{{asLowerCamelCase name}}{{/inline}} - {{#if (hasProperty expectedConstraints "type")}}VerifyOrReturn(CheckConstraintType("{{>item}}", "", "{{expectedConstraints.type}}"));{{/if}} - {{~#if (hasProperty expectedConstraints "format")}}VerifyOrReturn(CheckConstraintFormat("{{>item}}", "", "{{expectedConstraints.format}}"));{{/if}} - {{~#if (hasProperty expectedConstraints "startsWith")}}VerifyOrReturn(CheckConstraintStartsWith("{{>item}}", {{>actualValue}}, "{{expectedConstraints.startsWith}}"));{{/if}} - {{~#if (hasProperty expectedConstraints "endsWith")}}VerifyOrReturn(CheckConstraintEndsWith("{{>item}}", {{>actualValue}}, "{{expectedConstraints.endsWith}}"));{{/if}} - {{~#if (hasProperty expectedConstraints "isUpperCase")}}VerifyOrReturn(CheckConstraintIsUpperCase("{{>item}}", {{>actualValue}}, {{expectedConstraints.isUpperCase}}));{{/if}} - {{~#if (hasProperty expectedConstraints "isLowerCase")}}VerifyOrReturn(CheckConstraintIsLowerCase("{{>item}}", {{>actualValue}}, {{expectedConstraints.isLowerCase}}));{{/if}} - {{~#if (hasProperty expectedConstraints "isHexString")}}VerifyOrReturn(CheckConstraintIsHexString("{{>item}}", {{>actualValue}}, {{expectedConstraints.isHexString}}));{{/if}} - {{~#if (hasProperty expectedConstraints "minLength")}}VerifyOrReturn(CheckConstraintMinLength("{{>item}}", [{{>actualValue}} length], {{expectedConstraints.minLength}}));{{/if}} - {{~#if (hasProperty expectedConstraints "maxLength")}}VerifyOrReturn(CheckConstraintMaxLength("{{>item}}", [{{>actualValue}} length], {{expectedConstraints.maxLength}}));{{/if}} - {{~#if (hasProperty expectedConstraints "minValue")}} - if ({{>actualValue}} != nil) { - VerifyOrReturn(CheckConstraintMinValue<{{chipType}}>("{{>item}}", [{{>actualValue}} {{asObjectiveCNumberType "" type true}}Value], {{asTypedLiteral expectedConstraints.minValue type}})); - } - {{/if}} - {{~#if (hasProperty expectedConstraints "maxValue")}} - if ({{>actualValue}} != nil) { - VerifyOrReturn(CheckConstraintMaxValue<{{chipType}}>("{{>item}}", [{{>actualValue}} {{asObjectiveCNumberType "" type true}}Value], {{asTypedLiteral expectedConstraints.maxValue type}})); - } - {{/if}} - {{~#if (hasProperty expectedConstraints "notValue")}} - {{#if (isLiteralNull expectedConstraints.notValue)}} - VerifyOrReturn(CheckValueNonNull("{{>item}}", {{>actualValue}})); - {{else}} - if ({{>actualValue}} != nil) { - {{#if (isString type)}} - VerifyOrReturn(CheckConstraintNotValue("{{>item}}", {{>actualValue}}, {{asTypedLiteral expectedConstraints.notValue type}})); - {{else}} - VerifyOrReturn(CheckConstraintNotValue("{{>item}}", {{>actualValue}}, {{asTypedLiteral expectedConstraints.notValue type}})); - {{/if}} - } - {{/if}} + {{>maybeCheckExpectedConstraints}} + {{#if saveAs}} + { + {{saveAs}} = {{>actualValue}}; + } {{/if}} - {{/if}} - {{#if saveAs}} - { - {{saveAs}} = {{>actualValue}}; - } - {{/if}} - {{/chip_tests_item_response_parameters}} + {{/chip_tests_item_response_parameters}} {{#unless async}} NextTest(); diff --git a/examples/darwin-framework-tool/templates/tests/templates.json b/examples/darwin-framework-tool/templates/tests/templates.json index aab4af5cd3f79f..9311d32dd66062 100644 --- a/examples/darwin-framework-tool/templates/tests/templates.json +++ b/examples/darwin-framework-tool/templates/tests/templates.json @@ -38,6 +38,10 @@ { "name": "check_test_value", "path": "partials/check_test_value.zapt" + }, + { + "name": "maybeCheckExpectedConstraints", + "path": "partials/checks/maybeCheckExpectedConstraints.zapt" } ], "templates": [ diff --git a/src/app/tests/suites/TestConstraints.yaml b/src/app/tests/suites/TestConstraints.yaml index 9e09a1bb25255f..9c36134c1cbb9d 100644 --- a/src/app/tests/suites/TestConstraints.yaml +++ b/src/app/tests/suites/TestConstraints.yaml @@ -28,6 +28,36 @@ tests: - name: "nodeId" value: nodeId + # Tests for List of INT8U attribute + - label: "Write attribute LIST With List of INT8U" + command: "writeAttribute" + attribute: "list_int8u" + arguments: + value: [1, 2, 3, 4] + + - label: + "Read attribute LIST With Partial List of INT8U that should be in it" + command: "readAttribute" + attribute: "list_int8u" + response: + constraints: + contains: [2, 3, 4] + + - label: + "Read attribute LIST With Partial List of INT8U that should not be + included" + command: "readAttribute" + attribute: "list_int8u" + response: + constraints: + excludes: [0, 5] + + - label: "Write attribute LIST Back to Default Value" + command: "writeAttribute" + attribute: "list_int8u" + arguments: + value: [] + # Tests for INT32U attribute - label: "Write attribute INT32U Value" diff --git a/src/app/tests/suites/include/ConstraintsChecker.h b/src/app/tests/suites/include/ConstraintsChecker.h index 10c87d61095b93..327a076fbeeaa3 100644 --- a/src/app/tests/suites/include/ConstraintsChecker.h +++ b/src/app/tests/suites/include/ConstraintsChecker.h @@ -419,4 +419,46 @@ class ConstraintsChecker } return false; } + + template + bool CheckConstraintContains(const char * itemName, const chip::app::DataModel::DecodableList & current, const U & expected) + { + auto iterValue = current.begin(); + while (iterValue.Next()) + { + auto currentValue = iterValue.GetValue(); + if (currentValue == expected) + { + return true; + } + } + + Exit(std::string(itemName) + " expect the value " + std::to_string(expected) + " but the list does not contains it."); + return false; + } + + template + bool CheckConstraintExcludes(const char * itemName, const chip::app::DataModel::DecodableList & current, const U & expected) + { + auto iterValue = current.begin(); + while (iterValue.Next()) + { + auto currentValue = iterValue.GetValue(); + if (currentValue == expected) + { + Exit(std::string(itemName) + " does not expect the value " + std::to_string(expected) + + " but the list contains it."); + return false; + } + } + + CHIP_ERROR err = iterValue.GetStatus(); + if (CHIP_NO_ERROR != err) + { + Exit(std::string(chip::ErrorStr(err))); + return false; + } + + return true; + } }; diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index ad544f7098148c..8dbeb696c2f0d5 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -998,6 +998,18 @@ async function chip_tests_only_cluster_response_parameters(options) return asBlocks.call(this, Promise.resolve(this.arguments), options); } +function chip_tests_iterate_expected_list(values, options) +{ + values = values.map(value => { + return { + global: this.global, parent: this.parent, name: this.name, type: this.type, isArray: this.isArray, + isNullable: this.isNullable, value: value, + } + }); + + return asBlocks.call(this, Promise.resolve(values), options); +} + // // Module exports // @@ -1028,3 +1040,4 @@ exports.chip_tests_only_cluster_response_parameters = chip_tests_only_cluster_re exports.isHexString = isHexString; exports.octetStringLengthFromHexString = octetStringLengthFromHexString; exports.octetStringFromHexString = octetStringFromHexString; +exports.chip_tests_iterate_expected_list = chip_tests_iterate_expected_list; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index d8b83514c0d0a3..f5be77fa8a415b 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -49112,7 +49112,7 @@ class TestClusterComplexTypesSuite : public TestCommand class TestConstraintsSuite : public TestCommand { public: - TestConstraintsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestConstraints", 22, credsIssuerConfig) + TestConstraintsSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("TestConstraints", 26, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -49153,6 +49153,31 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); 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(CheckConstraintContains("value", value, 2)); + VerifyOrReturn(CheckConstraintContains("value", value, 3)); + VerifyOrReturn(CheckConstraintContains("value", value, 4)); + } + 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))); + VerifyOrReturn(CheckConstraintExcludes("value", value, 0)); + VerifyOrReturn(CheckConstraintExcludes("value", value, 5)); + } + 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)); { uint32_t value; @@ -49160,7 +49185,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintMinValue("value", value, 5UL)); } break; - case 3: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -49168,7 +49193,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 5UL)); } break; - case 4: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint32_t value; @@ -49176,13 +49201,13 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintNotValue("value", value, 6UL)); } break; - case 5: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49190,7 +49215,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintMinLength("value", value.size(), 5)); } break; - case 8: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49198,7 +49223,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 20)); } break; - case 9: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49206,7 +49231,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintStartsWith("value", value, "**")); } break; - case 10: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49214,10 +49239,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintEndsWith("value", value, "**")); } break; - case 11: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49226,10 +49251,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsLowerCase("value", value, true)); } break; - case 13: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49238,10 +49263,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsLowerCase("value", value, false)); } break; - case 15: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49250,10 +49275,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsLowerCase("value", value, false)); } break; - case 17: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49261,10 +49286,10 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsHexString("value", value, false)); } break; - case 19: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -49272,7 +49297,7 @@ class TestConstraintsSuite : public TestCommand VerifyOrReturn(CheckConstraintIsHexString("value", value, true)); } break; - case 21: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -49298,131 +49323,167 @@ class TestConstraintsSuite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Write attribute INT32U Value"); + LogStep(1, "Write attribute LIST With List of INT8U"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(4); + listFreer.add(listHolder_0); + listHolder_0->mList[0] = 1; + listHolder_0->mList[1] = 2; + listHolder_0->mList[2] = 3; + listHolder_0->mList[3] = 4; + value = chip::app::DataModel::List(listHolder_0->mList, 4); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "Read attribute LIST With Partial List of INT8U that should be in it"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read attribute LIST With Partial List of INT8U that should not be included"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Write attribute LIST Back to Default Value"); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 5: { + LogStep(5, "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 2: { - LogStep(2, "Read attribute INT32U Value MinValue Constraints"); + case 6: { + LogStep(6, "Read attribute INT32U Value MinValue Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, "Read attribute INT32U Value MaxValue Constraints"); + case 7: { + LogStep(7, "Read attribute INT32U Value MaxValue Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read attribute INT32U Value NotValue Constraints"); + case 8: { + LogStep(8, "Read attribute INT32U Value NotValue Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int32u::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Write attribute INT32U Value Back to Default Value"); + case 9: { + LogStep(9, "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 6: { - LogStep(6, "Write attribute CHAR_STRING Value"); + case 10: { + LogStep(10, "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 7: { - LogStep(7, "Read attribute CHAR_STRING Value MinLength Constraints"); + case 11: { + LogStep(11, "Read attribute CHAR_STRING Value MinLength Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read attribute CHAR_STRING Value MaxLength Constraints"); + case 12: { + LogStep(12, "Read attribute CHAR_STRING Value MaxLength Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read attribute CHAR_STRING Value StartsWith Constraints"); + case 13: { + LogStep(13, "Read attribute CHAR_STRING Value StartsWith Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read attribute CHAR_STRING Value EndsWith Constraints"); + case 14: { + LogStep(14, "Read attribute CHAR_STRING Value EndsWith Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Write attribute CHAR_STRING Value"); + case 15: { + LogStep(15, "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 12: { - LogStep(12, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); + case 16: { + LogStep(16, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Write attribute CHAR_STRING Value"); + case 17: { + LogStep(17, "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 14: { - LogStep(14, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); + case 18: { + LogStep(18, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase 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 19: { + LogStep(19, "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 16: { - LogStep(16, "Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints"); + case 20: { + LogStep(20, "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 21: { + LogStep(21, "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 18: { - LogStep(18, "Read attribute CHAR_STRING Value isHexString Constraints"); + case 22: { + LogStep(22, "Read attribute CHAR_STRING Value isHexString 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 23: { + LogStep(23, "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 20: { - LogStep(20, "Read attribute CHAR_STRING Value isHexString Constraints"); + case 24: { + LogStep(24, "Read attribute CHAR_STRING Value isHexString Constraints"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::CharString::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Write attribute CHAR_STRING Value Back to Default Value"); + case 25: { + LogStep(25, "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 a869ffdb549dc6..a0fb6be8ae2403 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -82756,62 +82756,61 @@ class TestConstraints : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write attribute INT32U Value\n"); - err = TestWriteAttributeInt32uValue_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Write attribute LIST With List of INT8U\n"); + err = TestWriteAttributeListWithListOfInt8u_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute INT32U Value MinValue Constraints\n"); - err = TestReadAttributeInt32uValueMinValueConstraints_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read attribute LIST With Partial List of INT8U that should be in it\n"); + err = TestReadAttributeListWithPartialListOfInt8uThatShouldBeInIt_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute INT32U Value MaxValue Constraints\n"); - err = TestReadAttributeInt32uValueMaxValueConstraints_3(); + ChipLogProgress( + chipTool, " ***** Test Step 3 : Read attribute LIST With Partial List of INT8U that should not be included\n"); + err = TestReadAttributeListWithPartialListOfInt8uThatShouldNotBeIncluded_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute INT32U Value NotValue Constraints\n"); - err = TestReadAttributeInt32uValueNotValueConstraints_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Write attribute LIST Back to Default Value\n"); + err = TestWriteAttributeListBackToDefaultValue_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write attribute INT32U Value Back to Default Value\n"); - err = TestWriteAttributeInt32uValueBackToDefaultValue_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Write attribute INT32U Value\n"); + err = TestWriteAttributeInt32uValue_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read attribute INT32U Value MinValue Constraints\n"); + err = TestReadAttributeInt32uValueMinValueConstraints_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute CHAR_STRING Value MinLength Constraints\n"); - err = TestReadAttributeCharStringValueMinLengthConstraints_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read attribute INT32U Value MaxValue Constraints\n"); + err = TestReadAttributeInt32uValueMaxValueConstraints_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute CHAR_STRING Value MaxLength Constraints\n"); - err = TestReadAttributeCharStringValueMaxLengthConstraints_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute INT32U Value NotValue Constraints\n"); + err = TestReadAttributeInt32uValueNotValueConstraints_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute CHAR_STRING Value StartsWith Constraints\n"); - err = TestReadAttributeCharStringValueStartsWithConstraints_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Write attribute INT32U Value Back to Default Value\n"); + err = TestWriteAttributeInt32uValueBackToDefaultValue_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read attribute CHAR_STRING Value EndsWith Constraints\n"); - err = TestReadAttributeCharStringValueEndsWithConstraints_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Write attribute CHAR_STRING Value\n"); + err = TestWriteAttributeCharStringValue_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Read attribute CHAR_STRING Value MinLength Constraints\n"); + err = TestReadAttributeCharStringValueMinLengthConstraints_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); - err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Read attribute CHAR_STRING Value MaxLength Constraints\n"); + err = TestReadAttributeCharStringValueMaxLengthConstraints_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Write attribute CHAR_STRING Value\n"); - err = TestWriteAttributeCharStringValue_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Read attribute CHAR_STRING Value StartsWith Constraints\n"); + err = TestReadAttributeCharStringValueStartsWithConstraints_13(); break; case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); - err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Read attribute CHAR_STRING Value EndsWith Constraints\n"); + err = TestReadAttributeCharStringValueEndsWithConstraints_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Write attribute CHAR_STRING Value\n"); @@ -82827,20 +82826,38 @@ class TestConstraints : public TestCommandBridge { err = TestWriteAttributeCharStringValue_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read attribute CHAR_STRING Value isHexString Constraints\n"); - err = TestReadAttributeCharStringValueIsHexStringConstraints_18(); + ChipLogProgress( + chipTool, " ***** Test Step 18 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_18(); break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Write attribute CHAR_STRING Value\n"); err = TestWriteAttributeCharStringValue_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read attribute CHAR_STRING Value isHexString Constraints\n"); - err = TestReadAttributeCharStringValueIsHexStringConstraints_20(); + ChipLogProgress( + chipTool, " ***** Test Step 20 : Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints\n"); + err = TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Write attribute CHAR_STRING Value Back to Default Value\n"); - err = TestWriteAttributeCharStringValueBackToDefaultValue_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(); + 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(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Write attribute CHAR_STRING Value Back to Default Value\n"); + err = TestWriteAttributeCharStringValueBackToDefaultValue_25(); break; } @@ -82919,6 +82936,18 @@ class TestConstraints : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -82932,7 +82961,7 @@ class TestConstraints : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 26; chip::Optional mNodeId; chip::Optional mCluster; @@ -82946,7 +82975,102 @@ class TestConstraints : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestWriteAttributeInt32uValue_1() + CHIP_ERROR TestWriteAttributeListWithListOfInt8u_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id listInt8uArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4]; + listInt8uArgument = temp_0; + } + [cluster writeAttributeListInt8uWithValue:listInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute LIST With List of INT8U Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeListWithPartialListOfInt8uThatShouldBeInIt_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute LIST With Partial List of INT8U that should be in it Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + VerifyOrReturn(CheckConstraintContains("listInt8u", value, 2)); + VerifyOrReturn(CheckConstraintContains("listInt8u", value, 3)); + VerifyOrReturn(CheckConstraintContains("listInt8u", value, 4)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeListWithPartialListOfInt8uThatShouldNotBeIncluded_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute LIST With Partial List of INT8U that should not be included Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + VerifyOrReturn(CheckConstraintExcludes("listInt8u", value, 0)); + VerifyOrReturn(CheckConstraintExcludes("listInt8u", value, 5)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeListBackToDefaultValue_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id listInt8uArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + listInt8uArgument = temp_0; + } + [cluster writeAttributeListInt8uWithValue:listInt8uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute LIST Back to Default Value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteAttributeInt32uValue_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -82966,7 +83090,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_2() + CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -82987,7 +83111,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_3() + CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83008,7 +83132,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_4() + CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83029,7 +83153,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_5() + CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83049,7 +83173,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_6() + CHIP_ERROR TestWriteAttributeCharStringValue_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83069,7 +83193,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_7() + CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83087,7 +83211,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_8() + CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83105,7 +83229,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_9() + CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_13() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83123,7 +83247,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_10() + CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_14() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83141,7 +83265,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_11() + CHIP_ERROR TestWriteAttributeCharStringValue_15() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83161,7 +83285,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12() + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83180,7 +83304,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_13() + CHIP_ERROR TestWriteAttributeCharStringValue_17() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83200,7 +83324,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14() + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_18() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83219,7 +83343,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_15() + CHIP_ERROR TestWriteAttributeCharStringValue_19() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83239,7 +83363,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16() + CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83258,7 +83382,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_17() + CHIP_ERROR TestWriteAttributeCharStringValue_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83278,7 +83402,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_18() + CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_22() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83296,7 +83420,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValue_19() + CHIP_ERROR TestWriteAttributeCharStringValue_23() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83316,7 +83440,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_20() + CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_24() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -83334,7 +83458,7 @@ class TestConstraints : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_21() + CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_25() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue];