-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix YAML tests handling of lists of structs that contain lists. (#13142)
The main issue was that comparing to such a value failed because we ended up with "iter" variables for both levels of list nesting that name-collided. The fix for that was to add "depth" disabmbiguation like we have in the Darwin codegen already. While adding a test for this, a few other issues were encountered: 1) The "commandValue" partial, when dealing with an optional or nullable struct, would do an Emplace() or SetNonNull() for every single member, which would wipe out earlier members. The fix for that is to do them once, and then use .Value() for the recursive partial invocation. 2) When sending a struct with optional fields, we were requiring the YAML to specify values for all the fields. Added if_include_struct_item_value to allow the YAML to not include values for such fields. 3) The YAML for checking struct values expected struct field names in the YAML to be lowerCamelCase instead of matching the XML case. The code for sending struct values expected struct field names to match the XML case. This inconsistency was very confusing, and this PR makes both expect the XML case. I verified that the only codegen changes due to this were in the TestModeSelectCluster and Test_TC_DM_2_2 tests. The latter had actually had its struct fields ignored because they were the "wrong" case.... Both tests fixed.
- Loading branch information
1 parent
b878ad3
commit d020705
Showing
21 changed files
with
4,229 additions
and
3,701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 12 additions & 6 deletions
18
examples/chip-tool/templates/partials/test_cluster_command_value.zapt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 12 additions & 10 deletions
22
examples/chip-tool/templates/partials/test_cluster_value_equals.zapt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.