We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
IsSuccess()
NullObjectType
1 parent 397dc02 commit ecc49a4Copy full SHA for ecc49a4
src/app/clusters/testing/ClusterTester.h
@@ -134,7 +134,14 @@ class ClusterTester
134
std::optional<ResponseType> response;
135
136
// Returns true if the command was successful and response is available
137
- bool IsSuccess() const { return status.has_value() && status->IsSuccess() && response.has_value(); }
+ bool IsSuccess() const
138
+ {
139
+ if constexpr (std::is_same_v<ResponseType, app::DataModel::NullObjectType>)
140
+ return status.has_value() && status->IsSuccess();
141
+ else
142
+ return status.has_value() && status->IsSuccess() && response.has_value();
143
+
144
+ }
145
};
146
147
// Invoke a command and return the decoded result.
0 commit comments