Skip to content

Commit 062b981

Browse files
andy31415restyled-commits
authored andcommitted
Rename 'Test Cluster' to 'Unit Testing' to unstutter class and item naming (project-chip#23495)
* Renamed Test Cluster to just test, to unstutter names. * zap regen * make all clusters compile * Make tests compile * Restyle * Fix expected JNI filename codegen * Fix darwin code renaming * Update cirque test for naming (no cluster suffix) * More updates for python: TestCluster to Clusters.Test * Correct cirque test to expect cluster name to be Test * Start renaming to Unit Testing for a more complete cluster name * more updates to maning for the test cluster to unit testing * make define consistent * Restyled by clang-format * Restyled by autopep8 * Fix up naming in the test cluster implementation * Restyled by clang-format * Fix darwin build * Fix cirque * Fix cirque * Fix cirque * Fix repl examples * Restyled by autopep8 * Fix android output files * Fix cirque * Another cirque fix * update ipynb code for Objects.UnitTesting * Replace more unusual auto-sed for cluster_objects * Replace comment in ipynmb * Restyled by autopep8 * Fix expected unit test cluster name. hoping this is the last cirque fix Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 4c9d10a commit 062b981

File tree

113 files changed

+11347
-11297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+11347
-11297
lines changed

docs/guides/python_chip_controller_building.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,10 @@ ZCL cluster commands.
624624
```python
625625
# devCtrl.WriteAttribute(<nodeid>, [(<endpointid>, Clusters.<cluster>.Attributes.<attribute>(value=<attribute value>))])
626626
# e.g.
627-
await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.Int8u(value=1))])
628-
await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.Boolean(value=True))])
629-
await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.OctetString(value=b'123123\x00'))])
630-
await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.CharString(value='233233'))])
627+
await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.Int8u(value=1))])
628+
await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.Boolean(value=True))])
629+
await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.OctetString(value=b'123123\x00'))])
630+
await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.CharString(value='233233'))])
631631
```
632632

633633
### `zclsubscribe <Cluster> <Attribute> <Nodeid> <Endpoint> <MinInterval> <MaxInterval>`

docs/guides/repl/Matter_Basic_Interactions.ipynb

+200-200
Large diffs are not rendered by default.

docs/guides/repl/Matter_REPL_Intro.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@
670670
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
671671
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">E.g</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
672672
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\"> </span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">(</span><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf; font-weight: bold\">1</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">, </span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
673-
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #bf7fbf; text-decoration-color: #bf7fbf; font-weight: bold\">Clusters.TestCluster.Attributes.XYZAttribute</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">…</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
673+
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #bf7fbf; text-decoration-color: #bf7fbf; font-weight: bold\">Clusters.UnitTesting.Attributes.XYZAttribute</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">…</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
674674
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">-- Write </span><span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">'hello'</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\"> to the XYZ attribute on the </span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
675675
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">test cluster to endpoint </span><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf; font-weight: bold\">1</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
676676
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-style: italic\">ZCLAttributeList</span> = <span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">def </span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ZCLAttributeList</span><span style=\"font-weight: bold\">()</span>: <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
@@ -893,7 +893,7 @@
893893
"\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n",
894894
"\u001b[34m│\u001b[0m \u001b[2mE.g\u001b[0m \u001b[34m│\u001b[0m\n",
895895
"\u001b[34m│\u001b[0m \u001b[2m \u001b[0m\u001b[1;2m(\u001b[0m\u001b[1;2;36m1\u001b[0m\u001b[2m, \u001b[0m \u001b[34m│\u001b[0m\n",
896-
"\u001b[34m│\u001b[0m \u001b[1;2;35mClusters.TestCluster.Attributes.XYZAttribute\u001b[0m\u001b[1;2m…\u001b[0m \u001b[34m│\u001b[0m\n",
896+
"\u001b[34m│\u001b[0m \u001b[1;2;35mClusters.UnitTesting.luster.Attributes.XYZAttribute\u001b[0m\u001b[1;2m…\u001b[0m \u001b[34m│\u001b[0m\n",
897897
"\u001b[34m│\u001b[0m \u001b[2m-- Write \u001b[0m\u001b[2;32m'hello'\u001b[0m\u001b[2m to the XYZ attribute on the \u001b[0m \u001b[34m│\u001b[0m\n",
898898
"\u001b[34m│\u001b[0m \u001b[2mtest cluster to endpoint \u001b[0m\u001b[1;2;36m1\u001b[0m \u001b[34m│\u001b[0m\n",
899899
"\u001b[34m│\u001b[0m \u001b[3;33mZCLAttributeList\u001b[0m = \u001b[3;96mdef \u001b[0m\u001b[1;31mZCLAttributeList\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m: \u001b[34m│\u001b[0m\n",

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -3528,7 +3528,7 @@ server cluster ElectricalMeasurement = 2820 {
35283528
readonly attribute int16u clusterRevision = 65533;
35293529
}
35303530

3531-
server cluster TestCluster = 4294048773 {
3531+
server cluster UnitTesting = 4294048773 {
35323532
enum SimpleEnum : ENUM8 {
35333533
kUnspecified = 0;
35343534
kValueA = 1;
@@ -4705,7 +4705,7 @@ endpoint 1 {
47054705
ram attribute clusterRevision default = 3;
47064706
}
47074707

4708-
server cluster TestCluster {
4708+
server cluster UnitTesting {
47094709
ram attribute boolean;
47104710
ram attribute bitmap8;
47114711
ram attribute bitmap16;

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+4-4
Original file line numberDiff line numberDiff line change
@@ -8055,7 +8055,7 @@
80558055
]
80568056
},
80578057
{
8058-
"name": "Test Cluster",
8058+
"name": "Unit Testing",
80598059
"code": 4294048773,
80608060
"mfgCode": null,
80618061
"define": "TEST_CLUSTER",
@@ -8107,7 +8107,7 @@
81078107
]
81088108
},
81098109
{
8110-
"name": "Test Cluster",
8110+
"name": "Unit Testing",
81118111
"code": 4294048773,
81128112
"mfgCode": null,
81138113
"define": "TEST_CLUSTER",
@@ -19159,7 +19159,7 @@
1915919159
]
1916019160
},
1916119161
{
19162-
"name": "Test Cluster",
19162+
"name": "Unit Testing",
1916319163
"code": 4294048773,
1916419164
"mfgCode": null,
1916519165
"define": "TEST_CLUSTER",
@@ -19331,7 +19331,7 @@
1933119331
]
1933219332
},
1933319333
{
19334-
"name": "Test Cluster",
19334+
"name": "Unit Testing",
1933519335
"code": 4294048773,
1933619336
"mfgCode": null,
1933719337
"define": "TEST_CLUSTER",

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -2952,7 +2952,7 @@ server cluster AccountLogin = 1294 {
29522952
timed command Logout(): DefaultSuccess = 3;
29532953
}
29542954

2955-
server cluster TestCluster = 4294048773 {
2955+
server cluster UnitTesting = 4294048773 {
29562956
enum SimpleEnum : ENUM8 {
29572957
kUnspecified = 0;
29582958
kValueA = 1;
@@ -3801,7 +3801,7 @@ endpoint 1 {
38013801
ram attribute clusterRevision default = 1;
38023802
}
38033803

3804-
server cluster TestCluster {
3804+
server cluster UnitTesting {
38053805
ram attribute boolean;
38063806
ram attribute bitmap8;
38073807
ram attribute bitmap16;

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap

+4-4
Original file line numberDiff line numberDiff line change
@@ -8055,7 +8055,7 @@
80558055
]
80568056
},
80578057
{
8058-
"name": "Test Cluster",
8058+
"name": "Unit Testing",
80598059
"code": 4294048773,
80608060
"mfgCode": null,
80618061
"define": "TEST_CLUSTER",
@@ -8107,7 +8107,7 @@
81078107
]
81088108
},
81098109
{
8110-
"name": "Test Cluster",
8110+
"name": "Unit Testing",
81118111
"code": 4294048773,
81128112
"mfgCode": null,
81138113
"define": "TEST_CLUSTER",
@@ -18951,7 +18951,7 @@
1895118951
]
1895218952
},
1895318953
{
18954-
"name": "Test Cluster",
18954+
"name": "Unit Testing",
1895518955
"code": 4294048773,
1895618956
"mfgCode": null,
1895718957
"define": "TEST_CLUSTER",
@@ -19123,7 +19123,7 @@
1912319123
]
1912419124
},
1912519125
{
19126-
"name": "Test Cluster",
19126+
"name": "Unit Testing",
1912719127
"code": 4294048773,
1912819128
"mfgCode": null,
1912919129
"define": "TEST_CLUSTER",

examples/thermostat/thermostat-common/thermostat.zap

+4-4
Original file line numberDiff line numberDiff line change
@@ -7011,7 +7011,7 @@
70117011
]
70127012
},
70137013
{
7014-
"name": "Test Cluster",
7014+
"name": "Unit Testing",
70157015
"code": 4294048773,
70167016
"mfgCode": null,
70177017
"define": "TEST_CLUSTER",
@@ -7063,7 +7063,7 @@
70637063
]
70647064
},
70657065
{
7066-
"name": "Test Cluster",
7066+
"name": "Unit Testing",
70677067
"code": 4294048773,
70687068
"mfgCode": null,
70697069
"define": "TEST_CLUSTER",
@@ -14129,7 +14129,7 @@
1412914129
]
1413014130
},
1413114131
{
14132-
"name": "Test Cluster",
14132+
"name": "Unit Testing",
1413314133
"code": 4294048773,
1413414134
"mfgCode": null,
1413514135
"define": "TEST_CLUSTER",
@@ -14173,7 +14173,7 @@
1417314173
]
1417414174
},
1417514175
{
14176-
"name": "Test Cluster",
14176+
"name": "Unit Testing",
1417714177
"code": 4294048773,
1417814178
"mfgCode": null,
1417914179
"define": "TEST_CLUSTER",

examples/tv-app/tv-common/tv-app.zap

+4-4
Original file line numberDiff line numberDiff line change
@@ -6921,7 +6921,7 @@
69216921
]
69226922
},
69236923
{
6924-
"name": "Test Cluster",
6924+
"name": "Unit Testing",
69256925
"code": 4294048773,
69266926
"mfgCode": null,
69276927
"define": "TEST_CLUSTER",
@@ -6973,7 +6973,7 @@
69736973
]
69746974
},
69756975
{
6976-
"name": "Test Cluster",
6976+
"name": "Unit Testing",
69776977
"code": 4294048773,
69786978
"mfgCode": null,
69796979
"define": "TEST_CLUSTER",
@@ -9219,7 +9219,7 @@
92199219
]
92209220
},
92219221
{
9222-
"name": "Test Cluster",
9222+
"name": "Unit Testing",
92239223
"code": 4294048773,
92249224
"mfgCode": null,
92259225
"define": "TEST_CLUSTER",
@@ -9271,7 +9271,7 @@
92719271
]
92729272
},
92739273
{
9274-
"name": "Test Cluster",
9274+
"name": "Unit Testing",
92759275
"code": 4294048773,
92769276
"mfgCode": null,
92779277
"define": "TEST_CLUSTER",

scripts/idl/test_xml_parser.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def testCluster(self):
5353
<!-- Comments should be supported -->
5454
<configurator>
5555
<cluster>
56-
<name>Test Cluster</name>
56+
<name>Test</name>
5757
<code>0x1234</code>
5858
5959
<attribute side="server" code="11" type="INT32U" min="0" max="2" isNullable="true" reportable="true" writable="false">SomeIntAttribute</attribute>
@@ -83,7 +83,7 @@ def testCluster(self):
8383
Idl(clusters=[
8484
Cluster(
8585
side=ClusterSide.CLIENT,
86-
name='TestCluster',
86+
name='Test',
8787
code=0x1234,
8888
attributes=[
8989
Attribute(definition=Field(data_type=DataType(name='INT32U'), code=11, name='SomeIntAttribute',
@@ -150,7 +150,7 @@ def testFabricScopedAndSensitive(self):
150150
idl = XmlToIdl('''<?xml version="1.0"?>
151151
<configurator>
152152
<cluster>
153-
<name>Test Cluster</name>
153+
<name>Test</name>
154154
<code>0x0001</code>
155155
156156
<event side="server" code="0x1234" name="FabricEvent" priority="info" isFabricSensitive="true" optional="false">
@@ -173,7 +173,7 @@ def testFabricScopedAndSensitive(self):
173173
''')
174174
self.assertEqual(idl,
175175
Idl(clusters=[Cluster(side=ClusterSide.CLIENT,
176-
name='TestCluster',
176+
name='Test',
177177
code=1,
178178
events=[Event(priority=EventPriority.INFO,
179179
name='FabricEvent',

0 commit comments

Comments
 (0)