diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index f645b8384b0c89..29ab97bdd7c445 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -16054,7 +16054,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "-20", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -16084,7 +16084,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "-100", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -16594,7 +16594,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "-20", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -16624,7 +16624,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "-100", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index fc2f71be34ce8e..f6bb994f02322a 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -3029,7 +3029,7 @@ tests: command: "readAttribute" attribute: "range_restricted_int8s" response: - value: 0 # ZAP won't allow setting a negative default! + value: -20 - label: "Write min value to a range-restricted signed 8-bit integer" command: "writeAttribute" @@ -3072,7 +3072,7 @@ tests: command: "readAttribute" attribute: "range_restricted_int8s" response: - value: 0 + value: -20 - label: "Write min valid value to a range-restricted signed 8-bit integer" command: "writeAttribute" @@ -3118,7 +3118,7 @@ tests: command: "readAttribute" attribute: "range_restricted_int16s" response: - value: 0 # ZAP won't allow setting a negative default! + value: -100 - label: "Write min value to a range-restricted signed 16-bit integer" command: "writeAttribute" @@ -3161,7 +3161,7 @@ tests: command: "readAttribute" attribute: "range_restricted_int16s" response: - value: 0 + value: -100 - label: "Write min valid value to a range-restricted signed 16-bit integer" command: "writeAttribute" @@ -3441,7 +3441,7 @@ tests: command: "readAttribute" attribute: "nullable_range_restricted_int8s" response: - value: 0 # ZAP won't allow setting a negative default! + value: -20 - label: "Write min value to a nullable range-restricted signed 8-bit integer" @@ -3487,7 +3487,7 @@ tests: command: "readAttribute" attribute: "nullable_range_restricted_int8s" response: - value: 0 + value: -20 - label: "Write min valid value to a nullable range-restricted signed 8-bit @@ -3556,7 +3556,7 @@ tests: command: "readAttribute" attribute: "nullable_range_restricted_int16s" response: - value: 0 # ZAP won't allow setting a negative default! + value: -100 - label: "Write min value to a nullable range-restricted signed 16-bit integer" @@ -3602,7 +3602,7 @@ tests: command: "readAttribute" attribute: "nullable_range_restricted_int16s" response: - value: 0 + value: -100 - label: "Write min valid value to a nullable range-restricted signed 16-bit diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 732e13b1787cb0..cfb6aac8859b70 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -29926,7 +29926,7 @@ - (void)testSendClusterTestCluster_000389_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue charValue], 0); + XCTAssertEqual([actualValue charValue], -20); } [expectation fulfill]; @@ -30047,7 +30047,7 @@ - (void)testSendClusterTestCluster_000394_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue charValue], 0); + XCTAssertEqual([actualValue charValue], -20); } [expectation fulfill]; @@ -30218,7 +30218,7 @@ - (void)testSendClusterTestCluster_000401_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue shortValue], 0); + XCTAssertEqual([actualValue shortValue], -100); } [expectation fulfill]; @@ -30339,7 +30339,7 @@ - (void)testSendClusterTestCluster_000406_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue shortValue], 0); + XCTAssertEqual([actualValue shortValue], -100); } [expectation fulfill]; @@ -31225,7 +31225,7 @@ - (void)testSendClusterTestCluster_000441_ReadAttribute { id actualValue = value; XCTAssertFalse(actualValue == nil); - XCTAssertEqual([actualValue charValue], 0); + XCTAssertEqual([actualValue charValue], -20); } [expectation fulfill]; @@ -31353,7 +31353,7 @@ - (void)testSendClusterTestCluster_000446_ReadAttribute { id actualValue = value; XCTAssertFalse(actualValue == nil); - XCTAssertEqual([actualValue charValue], 0); + XCTAssertEqual([actualValue charValue], -20); } [expectation fulfill]; @@ -31583,7 +31583,7 @@ - (void)testSendClusterTestCluster_000455_ReadAttribute { id actualValue = value; XCTAssertFalse(actualValue == nil); - XCTAssertEqual([actualValue shortValue], 0); + XCTAssertEqual([actualValue shortValue], -100); } [expectation fulfill]; @@ -31710,7 +31710,7 @@ - (void)testSendClusterTestCluster_000460_ReadAttribute { id actualValue = value; XCTAssertFalse(actualValue == nil); - XCTAssertEqual([actualValue shortValue], 0); + XCTAssertEqual([actualValue shortValue], -100); } [expectation fulfill]; diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 564db359b1f371..ddd4992624990f 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1412,15 +1412,15 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* start up color temperature mireds */ \ \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ - { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* range_restricted_int8u */ \ - { (uint16_t) 0x0, (uint16_t) -0x28, (uint16_t) 0x32 }, /* range_restricted_int8s */ \ - { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* range_restricted_int16u */ \ - { (uint16_t) 0x0, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* range_restricted_int16s */ \ - { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* nullable_range_restricted_int8u */ \ - { (uint16_t) 0x0, (uint16_t) -0x28, (uint16_t) 0x32 }, /* nullable_range_restricted_int8s */ \ - { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* nullable_range_restricted_int16u */ \ + { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* range_restricted_int8u */ \ + { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* range_restricted_int8s */ \ + { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* range_restricted_int16u */ \ + { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* range_restricted_int16s */ \ + { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* nullable_range_restricted_int8u */ \ + { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* nullable_range_restricted_int8s */ \ + { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* nullable_range_restricted_int16u */ \ { \ - (uint16_t) 0x0, (uint16_t) -0x96, (uint16_t) 0xC8 \ + (uint16_t) - 0x64, (uint16_t) -0x96, (uint16_t) 0xC8 \ } /* nullable_range_restricted_int16s */ \ } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 92839e75bea53f..4d1fe8f3452150 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -48917,7 +48917,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_389(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, 0)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, -20)); NextTest(); } @@ -49025,7 +49025,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_394(int8_t rangeRestrictedInt8s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, 0)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8s", rangeRestrictedInt8s, -20)); NextTest(); } @@ -49159,7 +49159,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_401(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, 0)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, -100)); NextTest(); } @@ -49267,7 +49267,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_406(int16_t rangeRestrictedInt16s) { - VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, 0)); + VerifyOrReturn(CheckValue("rangeRestrictedInt16s", rangeRestrictedInt16s, -100)); NextTest(); } @@ -50001,7 +50001,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_441(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), 0)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), -20)); NextTest(); } @@ -50115,7 +50115,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_446(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt8s) { VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8s", nullableRangeRestrictedInt8s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), 0)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8s.Value()", nullableRangeRestrictedInt8s.Value(), -20)); NextTest(); } @@ -50300,7 +50300,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_455(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), 0)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), -100)); NextTest(); } @@ -50414,7 +50414,7 @@ class TestCluster : public TestCommand void OnSuccessResponse_460(const chip::app::DataModel::Nullable & nullableRangeRestrictedInt16s) { VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt16s", nullableRangeRestrictedInt16s)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), 0)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt16s.Value()", nullableRangeRestrictedInt16s.Value(), -100)); NextTest(); }