Skip to content

Commit

Permalink
iox-#910 Set Callback Function in ntification test~
Browse files Browse the repository at this point in the history
  • Loading branch information
dkroenke committed Sep 23, 2021
1 parent 6c1a632 commit 86aae32
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions iceoryx_binding_c/test/moduletests/test_notification_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ class iox_notification_info_test : public Test
return m_memoryManager.getChunk(chunkSettings);
}

static void triggerCallback(iox_sub_t sub)
{
(void)sub;
}

static UserTrigger* m_lastNotificationCallbackArgument;
ConditionVariableData m_condVar{"myApp"};
Expand Down Expand Up @@ -142,7 +146,7 @@ TEST_F(iox_notification_info_test, notificationOriginIsUserTriggerPointerWhenIts

TEST_F(iox_notification_info_test, notificationOriginIsSubscriberPointerWhenItsOriginatingFromThemStateBased)
{
iox_ws_attach_subscriber_state(&m_waitSet, m_subscriberHandle, SubscriberState_HAS_DATA, 587U, NULL);
iox_ws_attach_subscriber_state(&m_waitSet, m_subscriberHandle, SubscriberState_HAS_DATA, 587U, triggerCallback);
this->Subscribe(&m_portPtr);
m_chunkPusher.push(getChunkFromMemoryManager());

Expand All @@ -154,7 +158,8 @@ TEST_F(iox_notification_info_test, notificationOriginIsSubscriberPointerWhenItsO

TEST_F(iox_notification_info_test, notificationOriginIsSubscriberPointerWhenItsOriginatingFromThemEventBased)
{
iox_ws_attach_subscriber_event(&m_waitSet, m_subscriberHandle, SubscriberEvent_DATA_RECEIVED, 587U, NULL);
iox_ws_attach_subscriber_event(
&m_waitSet, m_subscriberHandle, SubscriberEvent_DATA_RECEIVED, 587U, triggerCallback);
this->Subscribe(&m_portPtr);
m_chunkPusher.push(getChunkFromMemoryManager());

Expand All @@ -178,7 +183,7 @@ TEST_F(iox_notification_info_test, getOriginReturnsPointerToUserTriggerWhenOrigi

TEST_F(iox_notification_info_test, getOriginReturnsPointerToSubscriberWhenOriginatingFromThemStateBased)
{
iox_ws_attach_subscriber_state(&m_waitSet, m_subscriberHandle, SubscriberState_HAS_DATA, 587U, NULL);
iox_ws_attach_subscriber_state(&m_waitSet, m_subscriberHandle, SubscriberState_HAS_DATA, 587U, triggerCallback);
this->Subscribe(&m_portPtr);
m_chunkPusher.push(getChunkFromMemoryManager());

Expand All @@ -190,7 +195,8 @@ TEST_F(iox_notification_info_test, getOriginReturnsPointerToSubscriberWhenOrigin

TEST_F(iox_notification_info_test, getOriginReturnsPointerToSubscriberWhenOriginatingFromThemEventBased)
{
iox_ws_attach_subscriber_event(&m_waitSet, m_subscriberHandle, SubscriberEvent_DATA_RECEIVED, 587U, NULL);
iox_ws_attach_subscriber_event(
&m_waitSet, m_subscriberHandle, SubscriberEvent_DATA_RECEIVED, 587U, triggerCallback);
this->Subscribe(&m_portPtr);
m_chunkPusher.push(getChunkFromMemoryManager());

Expand Down

0 comments on commit 86aae32

Please sign in to comment.