-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make attribute-write yaml tests play nicer with complex types.
The key change is using zapTypeToEncodableClusterObjectType to declare the type and the "commandValue" partial to set it to the given value, which is more similar to how we handle command arguments. That makes things work for lists and nullables at the very least. The ignore="true" bit is probably not very well named, but it means "just use the 'container' value as-is, instead of treating it as a struct with member that stores the value". The fix in ClusterTestGeneration.js is just fixing a typo in the "type" values there that started to matter because we pass "type" to zapTypeToEncodableClusterObjectType. The fix in ClustersHelper.js is to give out synthetic "argument" to writeAttribute the same nullability as the actual attribute, so the types we get are right. The generated code changes are all no-ops so far, because we are not actually using any types that would be affected by this yet.
- Loading branch information
1 parent
64ffda0
commit cf293e1
Showing
5 changed files
with
297 additions
and
161 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
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.