LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
test_apps.cpp File Reference
#include <gtest/gtest.h>
#include <cstring>
#include "sender_app.h"
#include "udp_msg_api.h"
#include "monitor_app.h"
#include "udp_bridge_app.h"
#include "processor_app.h"
Include dependency graph for test_apps.cpp:

Data Structures

class  SenderAppTest
 
class  MonitorAppTest
 
class  UdpBridgeAppTest
 
class  ProcessorAppTest
 

Functions

static JUNO_STATUS_T UdpStub_Send (JUNO_UDP_ROOT_T *ptRoot, const UDP_THREAD_MSG_T *ptMsg)
 
static JUNO_STATUS_T UdpStub_Receive (JUNO_UDP_ROOT_T *ptRoot, UDP_THREAD_MSG_T *ptMsg)
 
static JUNO_STATUS_T UdpStub_Free (JUNO_UDP_ROOT_T *ptRoot)
 
static JUNO_STATUS_T TestOnStart (JUNO_APP_ROOT_T *ptApp)
 
static JUNO_STATUS_T TestOnProcess (JUNO_APP_ROOT_T *ptApp)
 
static JUNO_STATUS_T TestOnExit (JUNO_APP_ROOT_T *ptApp)
 
static void ResetDispatchFlags (void)
 
 TEST_F (SenderAppTest, InitNullAppReturnsNullptrError)
 
 TEST_F (SenderAppTest, InitNullUdpReturnsNullptrError)
 
 TEST_F (SenderAppTest, InitNullBrokerReturnsNullptrError)
 
 TEST_F (SenderAppTest, InitHappyPathWiresVtableAndStoresPointers)
 
 TEST_F (SenderAppTest, InitNullFailureHandlerIsAccepted)
 
 TEST_F (SenderAppTest, VtableDispatchOnStart)
 
 TEST_F (SenderAppTest, VtableDispatchOnProcess)
 
 TEST_F (SenderAppTest, VtableDispatchOnExit)
 
 TEST_F (SenderAppTest, ProductionVtableOnStartReturnsSuccess)
 
 TEST_F (SenderAppTest, ProductionVtableOnProcessReturnsSuccess)
 
 TEST_F (SenderAppTest, ProductionVtableOnExitReturnsSuccess)
 
 TEST_F (MonitorAppTest, InitNullAppReturnsNullptrError)
 
 TEST_F (MonitorAppTest, InitNullBrokerReturnsNullptrError)
 
 TEST_F (MonitorAppTest, InitNullPipeArrayReturnsNullptrError)
 
 TEST_F (MonitorAppTest, InitHappyPathWiresVtableAndStoresPointers)
 
 TEST_F (MonitorAppTest, InitNullFailureHandlerIsAccepted)
 
 TEST_F (MonitorAppTest, ProductionVtableOnStartReturnsSuccess)
 
 TEST_F (MonitorAppTest, ProductionVtableOnProcessReturnsSuccess)
 
 TEST_F (MonitorAppTest, ProductionVtableOnExitReturnsSuccess)
 
 TEST_F (UdpBridgeAppTest, InitNullAppReturnsNullptrError)
 
 TEST_F (UdpBridgeAppTest, InitNullUdpReturnsNullptrError)
 
 TEST_F (UdpBridgeAppTest, InitNullBrokerReturnsNullptrError)
 
 TEST_F (UdpBridgeAppTest, InitHappyPathWiresVtableAndStoresPointers)
 
 TEST_F (UdpBridgeAppTest, InitNullFailureHandlerIsAccepted)
 
 TEST_F (UdpBridgeAppTest, VtableDispatchOnStart)
 
 TEST_F (UdpBridgeAppTest, VtableDispatchOnProcess)
 
 TEST_F (UdpBridgeAppTest, VtableDispatchOnExit)
 
 TEST_F (UdpBridgeAppTest, ProductionVtableOnStartReturnsSuccess)
 
 TEST_F (UdpBridgeAppTest, ProductionVtableOnProcessReturnsSuccess)
 
 TEST_F (UdpBridgeAppTest, ProductionVtableOnExitReturnsSuccess)
 
 TEST_F (ProcessorAppTest, InitNullAppReturnsNullptrError)
 
 TEST_F (ProcessorAppTest, InitNullBrokerReturnsNullptrError)
 
 TEST_F (ProcessorAppTest, InitNullPipeArrayReturnsNullptrError)
 
 TEST_F (ProcessorAppTest, InitHappyPathWiresVtableAndStoresPointers)
 
 TEST_F (ProcessorAppTest, InitNullFailureHandlerIsAccepted)
 
 TEST_F (ProcessorAppTest, VtableDispatchOnStart)
 
 TEST_F (ProcessorAppTest, VtableDispatchOnProcess)
 
 TEST_F (ProcessorAppTest, VtableDispatchOnExit)
 
 TEST_F (ProcessorAppTest, ProductionVtableOnStartReturnsSuccess)
 
 TEST_F (ProcessorAppTest, ProductionVtableOnProcessReturnsSuccess)
 
 TEST_F (ProcessorAppTest, ProductionVtableOnExitReturnsSuccess)
 

Variables

static JUNO_UDP_ROOT_T s_tUdpStub
 
static JUNO_SB_BROKER_ROOT_T s_tBrokerStub
 
static UDPTH_MSG_ARRAY_T s_tMsgArray
 
static JUNO_SB_PIPE_Ts_aptBrokerPipeRegistry [4u]
 
static const JUNO_UDP_API_T s_tUdpStubApi = { UdpStub_Send, UdpStub_Receive, UdpStub_Free }
 
static bool s_bOnStartCalled = false
 
static bool s_bOnProcessCalled = false
 
static bool s_bOnExitCalled = false
 
static const JUNO_APP_API_T s_tTestAppApi
 

Function Documentation

◆ ResetDispatchFlags()

static void ResetDispatchFlags ( void  )
static

◆ TEST_F() [1/41]

TEST_F ( MonitorAppTest  ,
InitHappyPathWiresVtableAndStoresPointers   
)

◆ TEST_F() [2/41]

TEST_F ( MonitorAppTest  ,
InitNullAppReturnsNullptrError   
)

◆ TEST_F() [3/41]

TEST_F ( MonitorAppTest  ,
InitNullBrokerReturnsNullptrError   
)

◆ TEST_F() [4/41]

TEST_F ( MonitorAppTest  ,
InitNullFailureHandlerIsAccepted   
)

◆ TEST_F() [5/41]

TEST_F ( MonitorAppTest  ,
InitNullPipeArrayReturnsNullptrError   
)

◆ TEST_F() [6/41]

TEST_F ( MonitorAppTest  ,
ProductionVtableOnExitReturnsSuccess   
)

◆ TEST_F() [7/41]

TEST_F ( MonitorAppTest  ,
ProductionVtableOnProcessReturnsSuccess   
)

◆ TEST_F() [8/41]

TEST_F ( MonitorAppTest  ,
ProductionVtableOnStartReturnsSuccess   
)

◆ TEST_F() [9/41]

TEST_F ( ProcessorAppTest  ,
InitHappyPathWiresVtableAndStoresPointers   
)

◆ TEST_F() [10/41]

TEST_F ( ProcessorAppTest  ,
InitNullAppReturnsNullptrError   
)

◆ TEST_F() [11/41]

TEST_F ( ProcessorAppTest  ,
InitNullBrokerReturnsNullptrError   
)

◆ TEST_F() [12/41]

TEST_F ( ProcessorAppTest  ,
InitNullFailureHandlerIsAccepted   
)

◆ TEST_F() [13/41]

TEST_F ( ProcessorAppTest  ,
InitNullPipeArrayReturnsNullptrError   
)

◆ TEST_F() [14/41]

TEST_F ( ProcessorAppTest  ,
ProductionVtableOnExitReturnsSuccess   
)

◆ TEST_F() [15/41]

TEST_F ( ProcessorAppTest  ,
ProductionVtableOnProcessReturnsSuccess   
)

◆ TEST_F() [16/41]

TEST_F ( ProcessorAppTest  ,
ProductionVtableOnStartReturnsSuccess   
)

◆ TEST_F() [17/41]

TEST_F ( ProcessorAppTest  ,
VtableDispatchOnExit   
)

◆ TEST_F() [18/41]

TEST_F ( ProcessorAppTest  ,
VtableDispatchOnProcess   
)

◆ TEST_F() [19/41]

TEST_F ( ProcessorAppTest  ,
VtableDispatchOnStart   
)

◆ TEST_F() [20/41]

TEST_F ( SenderAppTest  ,
InitHappyPathWiresVtableAndStoresPointers   
)

◆ TEST_F() [21/41]

TEST_F ( SenderAppTest  ,
InitNullAppReturnsNullptrError   
)

◆ TEST_F() [22/41]

TEST_F ( SenderAppTest  ,
InitNullBrokerReturnsNullptrError   
)

◆ TEST_F() [23/41]

TEST_F ( SenderAppTest  ,
InitNullFailureHandlerIsAccepted   
)

◆ TEST_F() [24/41]

TEST_F ( SenderAppTest  ,
InitNullUdpReturnsNullptrError   
)

◆ TEST_F() [25/41]

TEST_F ( SenderAppTest  ,
ProductionVtableOnExitReturnsSuccess   
)

◆ TEST_F() [26/41]

TEST_F ( SenderAppTest  ,
ProductionVtableOnProcessReturnsSuccess   
)

◆ TEST_F() [27/41]

TEST_F ( SenderAppTest  ,
ProductionVtableOnStartReturnsSuccess   
)

◆ TEST_F() [28/41]

TEST_F ( SenderAppTest  ,
VtableDispatchOnExit   
)

◆ TEST_F() [29/41]

TEST_F ( SenderAppTest  ,
VtableDispatchOnProcess   
)

◆ TEST_F() [30/41]

TEST_F ( SenderAppTest  ,
VtableDispatchOnStart   
)

◆ TEST_F() [31/41]

TEST_F ( UdpBridgeAppTest  ,
InitHappyPathWiresVtableAndStoresPointers   
)

◆ TEST_F() [32/41]

TEST_F ( UdpBridgeAppTest  ,
InitNullAppReturnsNullptrError   
)

◆ TEST_F() [33/41]

TEST_F ( UdpBridgeAppTest  ,
InitNullBrokerReturnsNullptrError   
)

◆ TEST_F() [34/41]

TEST_F ( UdpBridgeAppTest  ,
InitNullFailureHandlerIsAccepted   
)

◆ TEST_F() [35/41]

TEST_F ( UdpBridgeAppTest  ,
InitNullUdpReturnsNullptrError   
)

◆ TEST_F() [36/41]

TEST_F ( UdpBridgeAppTest  ,
ProductionVtableOnExitReturnsSuccess   
)

◆ TEST_F() [37/41]

TEST_F ( UdpBridgeAppTest  ,
ProductionVtableOnProcessReturnsSuccess   
)

◆ TEST_F() [38/41]

TEST_F ( UdpBridgeAppTest  ,
ProductionVtableOnStartReturnsSuccess   
)

◆ TEST_F() [39/41]

TEST_F ( UdpBridgeAppTest  ,
VtableDispatchOnExit   
)

◆ TEST_F() [40/41]

TEST_F ( UdpBridgeAppTest  ,
VtableDispatchOnProcess   
)

◆ TEST_F() [41/41]

TEST_F ( UdpBridgeAppTest  ,
VtableDispatchOnStart   
)

◆ TestOnExit()

static JUNO_STATUS_T TestOnExit ( JUNO_APP_ROOT_T ptApp)
static

◆ TestOnProcess()

static JUNO_STATUS_T TestOnProcess ( JUNO_APP_ROOT_T ptApp)
static

◆ TestOnStart()

static JUNO_STATUS_T TestOnStart ( JUNO_APP_ROOT_T ptApp)
static

◆ UdpStub_Free()

static JUNO_STATUS_T UdpStub_Free ( JUNO_UDP_ROOT_T ptRoot)
static

◆ UdpStub_Receive()

static JUNO_STATUS_T UdpStub_Receive ( JUNO_UDP_ROOT_T ptRoot,
UDP_THREAD_MSG_T ptMsg 
)
static

◆ UdpStub_Send()

static JUNO_STATUS_T UdpStub_Send ( JUNO_UDP_ROOT_T ptRoot,
const UDP_THREAD_MSG_T ptMsg 
)
static

Variable Documentation

◆ s_aptBrokerPipeRegistry

JUNO_SB_PIPE_T* s_aptBrokerPipeRegistry[4u]
static

◆ s_bOnExitCalled

bool s_bOnExitCalled = false
static

◆ s_bOnProcessCalled

bool s_bOnProcessCalled = false
static

◆ s_bOnStartCalled

bool s_bOnStartCalled = false
static

◆ s_tBrokerStub

JUNO_SB_BROKER_ROOT_T s_tBrokerStub
static

◆ s_tMsgArray

UDPTH_MSG_ARRAY_T s_tMsgArray
static

◆ s_tTestAppApi

const JUNO_APP_API_T s_tTestAppApi
static
Initial value:
= {
}
static JUNO_STATUS_T TestOnStart(JUNO_APP_ROOT_T *ptApp)
Definition test_apps.cpp:59
static JUNO_STATUS_T TestOnProcess(JUNO_APP_ROOT_T *ptApp)
Definition test_apps.cpp:66
static JUNO_STATUS_T TestOnExit(JUNO_APP_ROOT_T *ptApp)
Definition test_apps.cpp:73

◆ s_tUdpStub

JUNO_UDP_ROOT_T s_tUdpStub
static

◆ s_tUdpStubApi

const JUNO_UDP_API_T s_tUdpStubApi = { UdpStub_Send, UdpStub_Receive, UdpStub_Free }
static