Unit tests for the cred2Ctrl application. More...

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. | |
Unit tests for the cred2Ctrl application.
Additional utility tests for the cred2Ctrl application.
Additional lifecycle tests for the cred2Ctrl application.
| libXWCTest::cred2CtrlTest::TEST_CASE | ( | "cred2Ctrl appLogic handles connection and housekeeping flow" | , |
| "" | [cred2Ctrl] | ||
| ) |
Verify appLogic covers connection transitions, steady-state refresh, and hardware-loss handling.
Definition at line 2055 of file cred2Ctrl_test.cpp.
References MagAOX::app::cred2Ctrl::appLogic(), MagAOX::app::stateCodes::CONNECTED, MagAOX::app::stateCodes::ERROR, MagAOX::app::lock(), MagAOX::app::stateCodes::NODEVICE, MagAOX::app::stateCodes::NOTCONNECTED, MagAOX::app::stateCodes::POWERON, MagAOX::app::stateCodes::READY, and XWCTEST_DOXYGEN_REF.
| 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.
| 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.
| 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.
| libXWCTest::cred2CtrlTest::TEST_CASE | ( | "cred2Ctrl framegrabber helpers manage acquisition and ROI configuration" | , |
| "" | [cred2Ctrl] | ||
| ) |
Verify framegrabber-facing helpers cover acquisition, copying, and reconfiguration logic.
Definition at line 1727 of file cred2Ctrl_test.cpp.
References MagAOX::app::cred2Ctrl::acquireAndCheckValid(), MagAOX::app::cred2Ctrl::configureAcquisition(), MagAOX::app::stateCodes::ERROR, MagAOX::app::cred2Ctrl::fps(), MagAOX::app::cred2Ctrl::loadImageIntoStream(), MagAOX::app::stateCodes::OPERATING, MagAOX::app::stateCodes::READY, MagAOX::app::cred2Ctrl::reconfig(), MagAOX::app::cred2Ctrl::startAcquisition(), and XWCTEST_DOXYGEN_REF.
| 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.
| 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.
Definition at line 631 of file cred2Ctrl_test.cpp.
References MagAOX::app::cred2ParseCropState(), MagAOX::app::cred2ParseFloat(), MagAOX::app::cred2ParseFloatVector(), MagAOX::app::cred2ParseRange(), MagAOX::app::cred2RoiFromCenter(), MagAOX::app::cred2RoiToCenter(), MagAOX::app::cred2Roi::endColumn, MagAOX::app::cred2Roi::fullFrame, and MagAOX::app::cred2Roi::startColumn.
| 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.
| 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.
Definition at line 1391 of file cred2Ctrl_test.cpp.
References MagAOX::app::cred2Ctrl::checkNextROI(), MagAOX::app::stateCodes::CONFIGURING, MagAOX::app::cred2RoiFromCenter(), MagAOX::app::cred2Ctrl::powerOnDefaults(), MagAOX::app::cred2Ctrl::setAnalogGain(), MagAOX::app::cred2Ctrl::setExpTime(), MagAOX::app::cred2Ctrl::setFanSpeed(), MagAOX::app::cred2Ctrl::setFPS(), MagAOX::app::cred2Ctrl::setLED(), MagAOX::app::cred2Ctrl::setNextROI(), MagAOX::app::cred2Ctrl::setTempControl(), MagAOX::app::cred2Ctrl::setTempSetPt(), MagAOX::app::cred2Roi::startColumn, MagAOX::app::cred2Roi::startRow, and XWCTEST_DOXYGEN_REF.
| 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.
| 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.
Definition at line 1935 of file cred2Ctrl_test.cpp.
References MagAOX::app::cred2Ctrl::appShutdown(), MagAOX::app::cred2Ctrl::checkRecordTimes(), MagAOX::logger::cred2_temps::lastRecord, MagAOX::logger::telem_fgtimings::lastRecord, MagAOX::logger::telem_stdcam::lastRecord, MagAOX::app::cred2Ctrl::onPowerOff(), MagAOX::app::cred2Ctrl::recordTelem(), MagAOX::app::cred2Ctrl::recordTemps(), MagAOX::app::cred2Ctrl::whilePowerOff(), and XWCTEST_DOXYGEN_REF.
| 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().
| 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.
Definition at line 194 of file cred2Utils_test.cpp.
References MagAOX::app::cred2ColumnsSpec(), MagAOX::app::cred2RoiFromCenter(), MagAOX::app::cred2RoiToCenter(), MagAOX::app::cred2RowsSpec(), MagAOX::app::cred2Roi::endColumn, MagAOX::app::cred2Roi::endRow, MagAOX::app::cred2Roi::fullFrame, MagAOX::app::cred2Roi::startColumn, and MagAOX::app::cred2Roi::startRow.
| 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().
| 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().
| 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().
| 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().
| 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().