ifw-slm 0.1.2
 
Loading...
Searching...
No Matches
testSlConfig.cpp File Reference

Unit tests for the slConfig module. More...

#include <ifw/slm/framework/slConfig.hpp>
#include <ifw/slm/framework/dataContext.hpp>
#include <rad/config.hpp>
#include <gtest/gtest.h>
#include <algorithm>

Classes

class  ifw::slm::TestSlConfig
 Test fixture for slConfig. More...
 

Namespaces

namespace  ifw
 
namespace  ifw::slm
 

Functions

 ifw::slm::TEST_F (TestSlConfig, GetNumSecondaryLoops_Default)
 Test that GetNumSecondaryLoops returns 0 for empty config.
 
 ifw::slm::TEST_F (TestSlConfig, IsLoopEnabled_Default)
 Test that IsLoopEnabled returns false when loop is not configured.
 
 ifw::slm::TEST_F (TestSlConfig, GetEnabledLoopIndices_Default)
 Test that GetEnabledLoopIndices returns empty for empty config.
 
 ifw::slm::TEST_F (TestSlConfig, GetLoopParam)
 Test GetLoopParam retrieval with default empty config.
 
 ifw::slm::TEST_F (TestSlConfig, GetNumSecondaryLoops_OneEnabled)
 Test with a populated config (1 enabled loop)
 
 ifw::slm::TEST_F (TestSlConfig, IsLoopEnabled_Configured)
 Test IsLoopEnabled with a populated config.
 
 ifw::slm::TEST_F (TestSlConfig, GetEnabledLoopIndices_WithEnabled)
 Test GetEnabledLoopIndices returns only enabled loops.
 
 ifw::slm::TEST_F (TestSlConfig, GetNumSecondaryLoops_TwoEnabled)
 Test GetNumSecondaryLoops with 2 enabled loops.
 
 ifw::slm::TEST_F (TestSlConfig, GetLoopParam_Configured)
 Test GetLoopParam with configured parameter.
 
 ifw::slm::TEST_F (TestSlConfig, DecomposeStatus_StatesAndSubstates)
 DecomposeStatus maps SM status paths to state/substate, incl. Running.
 
 ifw::slm::TEST_F (TestSlConfig, ToSupervisorSubstate_Mapping)
 ToSupervisorSubstate maps Running -> Idle and passes others through.
 
 ifw::slm::TEST_F (TestSlConfig, FormatSupervisorStatus_WireFormat)
 FormatSupervisorStatus emits the STD interface "<state>;<substate>".
 
 ifw::slm::TEST_F (TestSlConfig, DecomposeStatus_ErrorAndDefaults)
 DecomposeStatus maps an Error path and falls back to Off/Idle.
 
 ifw::slm::TEST_F (TestSlConfig, GetEnabledLoopIndices_StopsAtGap)
 GetEnabledLoopIndices stops at the first unconfigured loop.
 
 ifw::slm::TEST_F (TestSlConfig, GetLoopParam_VectorStringEntries)
 "params/<name>" lookups resolve to the configured value.
 
 ifw::slm::TEST_F (TestSlConfig, TryGetLoopVectorParam_AndTypedConversion)
 TryGetLoopVectorParam reports found/not-found and ignores non-params names; the typed GetLoopParamFromConfig converts the parsed value.
 

Detailed Description

Unit tests for the slConfig module.

slConfig provides functions for querying loop configuration such as GetNumSecondaryLoops, GetEnabledLoopIndices, IsLoopEnabled, etc.