Skip to content

Commit

Permalink
Add test TC EMR 1_1 (#11239)
Browse files Browse the repository at this point in the history
* Add Test_TC_EMR_1_1.yaml and update templates

* Update generated tests
  • Loading branch information
wystans authored and pull[bot] committed Jun 6, 2022
1 parent 85307d9 commit 1394162
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/chip-tool/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function getTests()
'Test_TC_DM_3_1',
];

const ElectricalMeasurement = [
'Test_TC_EMR_1_1',
];

const FlowMeasurement = [
'Test_TC_FLW_1_1',
'Test_TC_FLW_2_1',
Expand Down Expand Up @@ -161,6 +165,7 @@ function getTests()
BinaryInput, //
ColorControl, //
DeviceManagement, //
ElectricalMeasurement, //
FlowMeasurement, //
LevelControl, //
MediaControl, //
Expand Down
42 changes: 42 additions & 0 deletions src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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: 13.1.1. [TC-EMR-1.1] Global attributes with server as DUT

config:
cluster: "Electrical Measurement"
endpoint: 1

tests:
- label: "read the global attribute: ClusterRevision"
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 3

- label:
"write the default values to mandatory global attribute:
ClusterRevision"
command: "writeAttribute"
attribute: "ClusterRevision"
arguments:
value: 1
response:
error: 1

- label: "reads back global attribute: ClusterRevision"
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 3
5 changes: 5 additions & 0 deletions src/darwin/Framework/CHIP/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function getTests()
'Test_TC_DM_3_1',
];

const ElectricalMeasurement = [
'Test_TC_EMR_1_1',
];

const FlowMeasurement = [
'Test_TC_FLW_1_1',
'Test_TC_FLW_2_1',
Expand Down Expand Up @@ -145,6 +149,7 @@ function getTests()
BinaryInput, //
ColorControl, //
DeviceManagement, //
ElectricalMeasurement, //
FlowMeasurement, //
LevelControl, //
MediaControl, //
Expand Down
65 changes: 65 additions & 0 deletions src/darwin/Framework/CHIPTests/CHIPClustersTests.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 146 additions & 0 deletions zzz_generated/chip-tool/zap-generated/test/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1394162

Please sign in to comment.