From 13543203afa31dd542d4cc57b30c185cc297b34b Mon Sep 17 00:00:00 2001 From: "Josh V [Apple]" Date: Fri, 29 Oct 2021 13:04:09 -0700 Subject: [PATCH] New YAML cert test cases (#10534) * Add YAML files and update zap files. * Generated code. * Restyled by whitespace * Revert helper in chip tool. * Add tests to Darwin * Regenerating ZAP * Rebase master. * Generated code. Co-authored-by: Restyled.io Co-authored-by: Justin Wood --- examples/chip-tool/templates/tests.js | 6 + .../suites/certification/Test_TC_MC_2_1.yaml | 23 ++ .../suites/certification/Test_TC_MC_3_1.yaml | 142 ++++++++ .../suites/certification/Test_TC_MC_3_2.yaml | 36 ++ .../suites/certification/Test_TC_MC_3_3.yaml | 92 +++++ .../suites/certification/Test_TC_MC_3_4.yaml | 100 ++++++ .../suites/certification/Test_TC_MC_3_5.yaml | 28 ++ src/darwin/Framework/CHIP/templates/tests.js | 6 + .../Framework/CHIPTests/CHIPClustersTests.m | 20 ++ .../chip-tool/zap-generated/test/Commands.h | 322 ++++++++++++++++++ 10 files changed, 775 insertions(+) create mode 100644 src/app/tests/suites/certification/Test_TC_MC_2_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MC_3_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MC_3_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MC_3_3.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MC_3_4.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MC_3_5.yaml diff --git a/examples/chip-tool/templates/tests.js b/examples/chip-tool/templates/tests.js index 12fe1d08ffa5ef..af2e8377a76b55 100644 --- a/examples/chip-tool/templates/tests.js +++ b/examples/chip-tool/templates/tests.js @@ -68,6 +68,12 @@ function getTests() const MediaControl = [ 'Test_TC_MC_1_1', + 'Test_TC_MC_2_1', + 'Test_TC_MC_3_1', + 'Test_TC_MC_3_2', + 'Test_TC_MC_3_3', + 'Test_TC_MC_3_4', + 'Test_TC_MC_3_5', 'Test_TC_MC_3_6', 'Test_TC_MC_3_7', 'Test_TC_MC_3_8', diff --git a/src/app/tests/suites/certification/Test_TC_MC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_2_1.yaml new file mode 100644 index 00000000000000..3d3316b47f18e0 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MC_2_1.yaml @@ -0,0 +1,23 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 21.2.1. [TC-MC-2.1] Low Power Mode Verification (DUT as Server) + +config: + cluster: "Low Power" + endpoint: 1 + +tests: + - label: "Put the device into low power mode" + command: "Sleep" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml new file mode 100644 index 00000000000000..619aca4076148a --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml @@ -0,0 +1,142 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 21.3.1. [TC-MC-3.1] Navigation Keycode Verification + +config: + cluster: "Keypad Input" + endpoint: 1 + +tests: + - label: "Send Select" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x00 + + - label: "Send Up" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x01 + + - label: "Send Down" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x02 + + - label: "Send Left" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x03 + - label: "Send Right" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x04 + + - label: "Send RightUp" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x05 + + - label: "Send RightDown" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x06 + + - label: "Send LeftUp" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x07 + + - label: "Send LeftDown" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x08 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send SetupMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x0A + + - label: "Send ContentsMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x0B + + - label: "Send FavoriteMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x0C + + - label: "Send Exit" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x0D + + - label: "Send Invalid" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0xFF + response: + error: 1 + # TODO: Add Step 10 (TH sends Keycode to DUT, when DUT in a processing state) diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml new file mode 100644 index 00000000000000..ec7fcadb5bc25f --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml @@ -0,0 +1,36 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 21.3.2. [TC-MC-3.2] Location Keys Verification + +config: + cluster: "Keypad Input" + endpoint: 1 + +tests: + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send SetupMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x0A diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml new file mode 100644 index 00000000000000..98a19b7053b985 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml @@ -0,0 +1,92 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 21.3.3. [TC-MC-3.3] Number Keys Verification + +config: + cluster: "Keypad Input" + endpoint: 1 + +tests: + - label: "Send Numbers1" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x21 + + - label: "Send Numbers2" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x22 + + - label: "Send Numbers3" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x23 + + - label: "Send Numbers4" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x24 + + - label: "Send Numbers5" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x25 + + - label: "Send Numbers6" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x26 + + - label: "Send Numbers7" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x27 + + - label: "Send Numbers8" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x28 + + - label: "Send Numbers9" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x29 diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml new file mode 100644 index 00000000000000..c50d216df7dc94 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml @@ -0,0 +1,100 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 21.3.4. [TC-MC-3.4] Press And Hold Key Press Verification + +config: + cluster: "Keypad Input" + endpoint: 1 + +tests: + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 + + - label: "Send RootMenu" + disabled: true + command: "SendKey" + arguments: + values: + - name: "keyCode" + value: 0x09 diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_5.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_5.yaml new file mode 100644 index 00000000000000..6c4a4cef6d63a5 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MC_3_5.yaml @@ -0,0 +1,28 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 21.4.1. [TC-MC-3.5] Catalog List Verification + +config: + cluster: "Application Launcher" + endpoint: 1 + +tests: + # TODO: Need to enable when we can properly verify vendor id and uint16 + - label: "Read launch list attribute." + disabled: true + command: "readAttribute" + attribute: "application launcher list" + response: + value: [] diff --git a/src/darwin/Framework/CHIP/templates/tests.js b/src/darwin/Framework/CHIP/templates/tests.js index 410c32582fedb6..079f9ab5c357a8 100644 --- a/src/darwin/Framework/CHIP/templates/tests.js +++ b/src/darwin/Framework/CHIP/templates/tests.js @@ -68,6 +68,12 @@ function getTests() const MediaControl = [ 'Test_TC_MC_1_1', + 'Test_TC_MC_2_1', + 'Test_TC_MC_3_1', + 'Test_TC_MC_3_2', + 'Test_TC_MC_3_3', + 'Test_TC_MC_3_4', + 'Test_TC_MC_3_5', 'Test_TC_MC_3_6', 'Test_TC_MC_3_7', 'Test_TC_MC_3_8', diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 9c3909e72c0160..0b396b377d145c 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -7238,6 +7238,26 @@ - (void)testSendClusterTest_TC_MC_1_1_000000_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_MC_2_1_000000_Sleep +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Put the device into low power mode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster sleep:^(NSError * err, NSDictionary * values) { + NSLog(@"Put the device into low power mode Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTest_TC_OCC_1_1_000000_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 5fbe4391caf3f3..85eab70e541b24 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -11748,6 +11748,322 @@ class Test_TC_MC_1_1 : public TestCommand void OnSuccessResponse_0(uint16_t clusterRevision) { ThrowSuccessResponse(); } }; +class Test_TC_MC_2_1 : public TestCommand +{ +public: + Test_TC_MC_2_1() : TestCommand("Test_TC_MC_2_1"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_2_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Put the device into low power mode\n"); + err = TestPutTheDeviceIntoLowPowerMode_0(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 1; + + // + // Tests methods + // + + CHIP_ERROR TestPutTheDeviceIntoLowPowerMode_0() + { + chip::Controller::LowPowerClusterTest cluster; + cluster.Associate(mDevice, 1); + + using requestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; + using responseType = chip::app::DataModel::NullObjectType; + + chip::app::Clusters::LowPower::Commands::Sleep::Type request; + + auto success = [](void * context, const responseType & data) { + (static_cast(context))->OnSuccessResponse_0(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_0(status); + }; + return cluster.InvokeCommand(request, this, success, failure); + } + + void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_0() { NextTest(); } +}; + +class Test_TC_MC_3_1 : public TestCommand +{ +public: + Test_TC_MC_3_1() : TestCommand("Test_TC_MC_3_1"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + // + // Tests methods + // +}; + +class Test_TC_MC_3_2 : public TestCommand +{ +public: + Test_TC_MC_3_2() : TestCommand("Test_TC_MC_3_2"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_2\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + // + // Tests methods + // +}; + +class Test_TC_MC_3_3 : public TestCommand +{ +public: + Test_TC_MC_3_3() : TestCommand("Test_TC_MC_3_3"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_3\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + // + // Tests methods + // +}; + +class Test_TC_MC_3_4 : public TestCommand +{ +public: + Test_TC_MC_3_4() : TestCommand("Test_TC_MC_3_4"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_4\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + // + // Tests methods + // +}; + +class Test_TC_MC_3_5 : public TestCommand +{ +public: + Test_TC_MC_3_5() : TestCommand("Test_TC_MC_3_5"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_5\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + // + // Tests methods + // +}; + class Test_TC_MC_3_6 : public TestCommand { public: @@ -24040,6 +24356,12 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(),