Skip to content

Commit 2b2c773

Browse files
silabs-borislagarwal57
authored andcommitted
GH-22: Fix zwave_command_class_node_info_resolver unit test
GH-22 add a new callback on the give_up_listener on the ATTRIBUTE_ZWAVE_SECURE_NIF attribute causing the test case to fail. The test only expect this listener to be called on the non-secure NIF ATTRIBUTE_ZWAVE_NIF. This change make sure that the code is only executed in the context of ATTRIBUTE_ZWAVE_NIF and ignored for ATTRIBUTE_ZWAVE_SECURE_NIF as this test don't care about it. Bug-SiliconLabs: UIC-3082 Relate-to: #22 Forwarded-SiliconLabs: task/UIC-3082/phcoval/GH-22/develop
1 parent 7c371a3 commit 2b2c773

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

applications/zpc/components/zwave_command_classes/test/zwave_command_class_node_info_resolver_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ void attribute_resolver_set_resolution_give_up_listener_stub(
7373
attribute_resolver_callback_t callback,
7474
int cmock_num_calls)
7575
{
76-
TEST_ASSERT_EQUAL(ATTRIBUTE_ZWAVE_NIF, node_type);
77-
on_nif_resolution_abort = callback;
78-
return;
76+
if (ATTRIBUTE_ZWAVE_NIF == node_type) {
77+
on_nif_resolution_abort = callback;
78+
}
7979
}
8080

8181
sl_status_t zwave_controller_register_callbacks_stub(

0 commit comments

Comments
 (0)