From 836ec3dc8a107b9003993b50860ce33452eb8655 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Mon, 22 Nov 2021 16:41:33 -0500 Subject: [PATCH] merge conflict fix --- .../chip-tool/zap-generated/test/Commands.h | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index d08f7bc4e08ce2..88543ae6b8e7ac 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -38353,6 +38353,8 @@ class TestGroupMessaging : public TestCommand (static_cast(context))->OnFailureResponse_2(chip::to_underlying(status)); } + static void OnDoneCallback_2(void * context) { (static_cast(context))->OnDoneResponse_2(); } + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, EmberAfStatus status) @@ -38386,7 +38388,62 @@ class TestGroupMessaging : public TestCommand void OnSuccessResponse_0() { NextTest(); } - + void OnDoneResponse_0() { NextTest(); } + + CHIP_ERROR TestReadBackAttribute_1() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + chip::Controller::BasicClusterTest cluster; + cluster.Associate(mDevice, endpoint); + + return cluster.ReadAttribute(this, OnSuccessCallback_1, + OnFailureCallback_1); + } + + void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(chip::CharSpan location) + { + VerifyOrReturn(CheckValueAsString("location", location, chip::CharSpan("us", 2))); + NextTest(); + } + + CHIP_ERROR TestRestoreInitialLocationValue_2() + { + const chip::GroupId groupId = 1234; + chip::Controller::BasicClusterTest cluster; + cluster.AssociateWithGroup(mDevice, groupId); + + chip::CharSpan locationArgument; + locationArgument = chip::Span("garbage: not in length on purpose", 0); + + return cluster.WriteAttribute( + locationArgument, this, OnSuccessCallback_2, OnFailureCallback_2, OnDoneCallback_2); + } + + void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2() { NextTest(); } + + void OnDoneResponse_2() { NextTest(); } + + CHIP_ERROR TestReadBackAttribute_3() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + chip::Controller::BasicClusterTest cluster; + cluster.Associate(mDevice, endpoint); + + return cluster.ReadAttribute(this, OnSuccessCallback_3, + OnFailureCallback_3); + } + + void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(chip::CharSpan location) + { + VerifyOrReturn(CheckValueAsString("location", location, chip::CharSpan("", 0))); + NextTest(); + } }; class Test_TC_DIAGSW_1_1 : public TestCommand