API
 
Loading...
Searching...
No Matches

Unit tests for the cred2Ctrl application. More...

Collaboration diagram for cred2Ctrl Unit Tests:

Namespaces

namespace  libXWCTest::cred2CtrlTest
 Namespace for cred2Ctrl lifecycle unit tests.
 

Functions

 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl lifecycle entrypoints handle startup failures and success", "[cred2Ctrl]")
 Verify lifecycle entrypoints cover startup failure handling and successful startup cleanup.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl configuration loading writes a runtime EDT config", "[cred2Ctrl]")
 Verify configuration loading writes the runtime EDT config and applies overrides.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl helper mappings normalize responses and preset names", "[cred2Ctrl]")
 Verify local response helpers cover the C-RED 2-specific preset mappings.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl command helpers clean responses and validate acknowledgements", "[cred2Ctrl]")
 Verify serial helper wrappers clean responses and report transport failures consistently.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl syncROIFromCamera tracks camera cropping state", "[cred2Ctrl]")
 Verify ROI synchronization handles full-frame, cropped, and reconfiguring camera states.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl getter helpers parse temperatures fps and limits", "[cred2Ctrl]")
 Verify the primary getter helpers update cached state and tolerate malformed responses.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl discrete getter helpers cover fallback parsing paths", "[cred2Ctrl]")
 Verify the remaining getter helpers parse discrete fan gain and LED state.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl setter helpers validate bounds and update state", "[cred2Ctrl]")
 Verify the setter helpers validate bounds and send the expected serial commands.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl framegrabber helpers manage acquisition and ROI configuration", "[cred2Ctrl]")
 Verify framegrabber-facing helpers cover acquisition, copying, and reconfiguration logic.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl telemetry wrappers and power-off helpers update cached state", "[cred2Ctrl]")
 Verify telemetry wrappers emit their records and helper lifecycle methods reset cached state.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl appLogic handles connection and housekeeping flow", "[cred2Ctrl]")
 Verify appLogic covers connection transitions, steady-state refresh, and hardware-loss handling.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl utility helpers clean CLI responses", "[cred2Utils]")
 Verify cred2CleanResponse() strips prompts and trailing line endings.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl utility helpers parse float responses", "[cred2Utils]")
 Verify cred2ParseFloat() accepts valid values and rejects non-numeric responses.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl utility helpers parse float-vector responses", "[cred2Utils]")
 Verify cred2ParseFloatVector() enforces both parsing and element-count expectations.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl utility helpers parse range responses", "[cred2Utils]")
 Verify cred2ParseRange() extracts the encoded bounds from valid responses.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl utility helpers parse boolean responses", "[cred2Utils]")
 Verify cred2ParseBool() translates textual on/off responses into booleans.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl utility helpers parse crop responses", "[cred2Utils]")
 Verify cred2ParseCropState() unpacks the enabled flag and ROI bounds.
 
 libXWCTest::cred2CtrlTest::TEST_CASE ("cred2Ctrl utility helpers format ROI commands", "[cred2Utils]")
 Verify the C-RED 2 ROI conversion helpers translate between center/size and corner commands.
 

Detailed Description

Unit tests for the cred2Ctrl application.

Additional utility tests for the cred2Ctrl application.

Additional lifecycle tests for the cred2Ctrl application.

Function Documentation

◆ TEST_CASE() [1/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl appLogic handles connection and housekeeping flow"  ,
""  [cred2Ctrl] 
)

◆ TEST_CASE() [2/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl command helpers clean responses and validate acknowledgements"  ,
""  [cred2Ctrl] 
)

Verify serial helper wrappers clean responses and report transport failures consistently.

Definition at line 734 of file cred2Ctrl_test.cpp.

References MagAOX::app::cred2Ctrl::issueCommand(), MagAOX::app::cred2Ctrl::sendCommand(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [3/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl configuration loading writes a runtime EDT config"  ,
""  [cred2Ctrl] 
)

Verify configuration loading writes the runtime EDT config and applies overrides.

Definition at line 527 of file cred2Ctrl_test.cpp.

References edt_perror(), MagAOX::app::cred2Ctrl::loadConfig(), pdv_serial_command(), pdv_serial_read(), pdv_serial_wait(), MagAOX::app::cred2Ctrl::setupConfig(), MagAOX::app::cred2Ctrl::writeConfig(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [4/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl discrete getter helpers cover fallback parsing paths"  ,
""  [cred2Ctrl] 
)

Verify the remaining getter helpers parse discrete fan gain and LED state.

Definition at line 1149 of file cred2Ctrl_test.cpp.

References MagAOX::app::cred2Ctrl::getAnalogGain(), MagAOX::app::cred2Ctrl::getFanSpeed(), MagAOX::app::cred2Ctrl::getLEDState(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [5/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl framegrabber helpers manage acquisition and ROI configuration"  ,
""  [cred2Ctrl] 
)

◆ TEST_CASE() [6/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl getter helpers parse temperatures fps and limits"  ,
""  [cred2Ctrl] 
)

Verify the primary getter helpers update cached state and tolerate malformed responses.

Definition at line 965 of file cred2Ctrl_test.cpp.

References MagAOX::app::cred2Ctrl::getFPS(), MagAOX::app::cred2Ctrl::getTemps(), MagAOX::app::cred2Ctrl::updateFPSLimits(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [7/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl helper mappings normalize responses and preset names"  ,
""  [cred2Ctrl] 
)

◆ TEST_CASE() [8/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl lifecycle entrypoints handle startup failures and success"  ,
""  [cred2Ctrl] 
)

Verify lifecycle entrypoints cover startup failure handling and successful startup cleanup.

Definition at line 31 of file cred2Ctrl_lifecycle_test.cpp.

References MagAOX::app::cred2Ctrl::appStartup(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [9/18]

◆ TEST_CASE() [10/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl syncROIFromCamera tracks camera cropping state"  ,
""  [cred2Ctrl] 
)

Verify ROI synchronization handles full-frame, cropped, and reconfiguring camera states.

Definition at line 798 of file cred2Ctrl_test.cpp.

References MagAOX::app::cred2Ctrl::syncROIFromCamera(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [11/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl telemetry wrappers and power-off helpers update cached state"  ,
""  [cred2Ctrl] 
)

◆ TEST_CASE() [12/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl utility helpers clean CLI responses"  ,
""  [cred2Utils] 
)

Verify cred2CleanResponse() strips prompts and trailing line endings.

Definition at line 33 of file cred2Utils_test.cpp.

References MagAOX::app::cred2CleanResponse().

◆ TEST_CASE() [13/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl utility helpers format ROI commands"  ,
""  [cred2Utils] 
)

◆ TEST_CASE() [14/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl utility helpers parse boolean responses"  ,
""  [cred2Utils] 
)

Verify cred2ParseBool() translates textual on/off responses into booleans.

Definition at line 148 of file cred2Utils_test.cpp.

References MagAOX::app::cred2ParseBool().

◆ TEST_CASE() [15/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl utility helpers parse crop responses"  ,
""  [cred2Utils] 
)

Verify cred2ParseCropState() unpacks the enabled flag and ROI bounds.

Definition at line 167 of file cred2Utils_test.cpp.

References MagAOX::app::cred2ParseCropState().

◆ TEST_CASE() [16/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl utility helpers parse float responses"  ,
""  [cred2Utils] 
)

Verify cred2ParseFloat() accepts valid values and rejects non-numeric responses.

Definition at line 60 of file cred2Utils_test.cpp.

References MagAOX::app::cred2ParseFloat().

◆ TEST_CASE() [17/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl utility helpers parse float-vector responses"  ,
""  [cred2Utils] 
)

Verify cred2ParseFloatVector() enforces both parsing and element-count expectations.

Definition at line 90 of file cred2Utils_test.cpp.

References MagAOX::app::cred2ParseFloatVector().

◆ TEST_CASE() [18/18]

libXWCTest::cred2CtrlTest::TEST_CASE ( "cred2Ctrl utility helpers parse range responses"  ,
""  [cred2Utils] 
)

Verify cred2ParseRange() extracts the encoded bounds from valid responses.

Definition at line 127 of file cred2Utils_test.cpp.

References MagAOX::app::cred2ParseRange().