API
 
Loading...
Searching...
No Matches

Unit tests for the flowRPM application. More...

Collaboration diagram for flowRPM Unit Tests:

Namespaces

namespace  libXWCTest::flowRPMTest
 Namespace for flowRPM unit tests.
 

Functions

 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM configuration defaults load correctly", "[flowRPM]")
 Verify default flowRPM configuration values are loaded.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM configuration overrides load correctly", "[flowRPM]")
 Verify configured flowRPM overrides are loaded.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM loadConfig sets shutdown on configuration failure", "[flowRPM]")
 Verify loadConfig() requests shutdown when configuration loading fails.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM helper token parsing handles whitespace-only input", "[flowRPM]")
 Verify trimToken() removes surrounding whitespace and handles blank tokens.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM helper logical-line splitting handles CRLF and blank lines", "[flowRPM]")
 Verify splitLogicalLines() removes CRLF suffixes and ignores blank lines.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM parseResult defaults to the invalid sentinel state", "[flowRPM]")
 Verify the default-initialized parseResult sentinel state.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM timestamp parsing covers valid and malformed inputs", "[flowRPM]")
 Verify parseTimestamp() accepts valid input and rejects malformed timestamps.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM record-line parsing covers all parse branches", "[flowRPM]")
 Verify parseRecordLine() covers the accepted and rejected record formats.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM file parsing", "[flowRPM]")
 Verify parseFileContents() handles valid, invalid, and stale two-line inputs.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM reads and parses configured files", "[flowRPM]")
 Verify readAndParse() reads through the configured path and handles missing files.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM appStartup initializes state and published status", "[flowRPM]")
 Verify appStartup() initializes the published state and transitions to READY.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM appShutdown completes cleanly", "[flowRPM]")
 Verify appShutdown() completes cleanly.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM log backoff is per error key and interval", "[flowRPM]")
 Verify repeated error logging is rate-limited per status key.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM recordTelem forces telemetry bookkeeping refresh", "[flowRPM]")
 Verify recordTelem() forces the telemeter bookkeeping update.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM appLogic drives end-to-end display-state updates", "[flowRPM]")
 Verify appLogic() executes the nominal runtime control flow.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM appLogic returns errors when internal steps fail", "[flowRPM]")
 Verify appLogic() returns errors when internal runtime steps fail.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM display-state reconciliation", "[flowRPM]")
 Verify reconcileResult() and publishResult() manage held and invalid display state.
 
 libXWCTest::flowRPMTest::TEST_CASE ("flowRPM statusKey maps parse statuses consistently", "[flowRPM]")
 Verify statusKey() maps every parser status to a stable log key.
 

Detailed Description

Unit tests for the flowRPM application.

Function Documentation

◆ TEST_CASE() [1/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM appLogic drives end-to-end display-state updates"  ,
""  [flowRPM] 
)

◆ TEST_CASE() [2/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM appLogic returns errors when internal steps fail"  ,
""  [flowRPM] 
)

Verify appLogic() returns errors when internal runtime steps fail.

Definition at line 725 of file flowRPM_test.cpp.

References MagAOX::app::flowRPM::appLogic(), and MagAOX::app::flowRPM::appStartup().

◆ TEST_CASE() [3/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM appShutdown completes cleanly"  ,
""  [flowRPM] 
)

Verify appShutdown() completes cleanly.

Definition at line 555 of file flowRPM_test.cpp.

References MagAOX::app::flowRPM::appShutdown(), and MagAOX::app::flowRPM::appStartup().

◆ TEST_CASE() [4/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM appStartup initializes state and published status"  ,
""  [flowRPM] 
)

Verify appStartup() initializes the published state and transitions to READY.

Definition at line 536 of file flowRPM_test.cpp.

References MagAOX::app::flowRPM::appStartup(), MagAOX::app::flowRPM::badValue(), MagAOX::app::flowRPM::m_indiP_status, MagAOX::app::stateCodes::READY, and MagAOX::app::MagAOXApp< _useINDI >::state().

◆ TEST_CASE() [5/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM configuration defaults load correctly"  ,
""  [flowRPM] 
)

◆ TEST_CASE() [6/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM configuration overrides load correctly"  ,
""  [flowRPM] 
)

◆ TEST_CASE() [7/18]

◆ TEST_CASE() [8/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM file parsing"  ,
""  [flowRPM] 
)

◆ TEST_CASE() [9/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM helper logical-line splitting handles CRLF and blank lines"  ,
""  [flowRPM] 
)

Verify splitLogicalLines() removes CRLF suffixes and ignores blank lines.

Definition at line 219 of file flowRPM_test.cpp.

References MagAOX::app::flowRPMDetail::splitLogicalLines().

◆ TEST_CASE() [10/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM helper token parsing handles whitespace-only input"  ,
""  [flowRPM] 
)

Verify trimToken() removes surrounding whitespace and handles blank tokens.

Definition at line 204 of file flowRPM_test.cpp.

References MagAOX::app::flowRPMDetail::trimToken().

◆ TEST_CASE() [11/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM loadConfig sets shutdown on configuration failure"  ,
""  [flowRPM] 
)

Verify loadConfig() requests shutdown when configuration loading fails.

Definition at line 184 of file flowRPM_test.cpp.

References MagAOX::app::flowRPM::loadConfig(), and MagAOX::app::flowRPM::setupConfig().

◆ TEST_CASE() [12/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM log backoff is per error key and interval"  ,
""  [flowRPM] 
)

Verify repeated error logging is rate-limited per status key.

Definition at line 573 of file flowRPM_test.cpp.

References MagAOX::app::flowRPM::shouldLogError().

◆ TEST_CASE() [13/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM parseResult defaults to the invalid sentinel state"  ,
""  [flowRPM] 
)

◆ TEST_CASE() [14/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM reads and parses configured files"  ,
""  [flowRPM] 
)

◆ TEST_CASE() [15/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM record-line parsing covers all parse branches"  ,
""  [flowRPM] 
)

Verify parseRecordLine() covers the accepted and rejected record formats.

Definition at line 296 of file flowRPM_test.cpp.

References MagAOX::app::flowRPM::badValue(), and MagAOX::app::flowRPM::parseRecordLine().

◆ TEST_CASE() [16/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM recordTelem forces telemetry bookkeeping refresh"  ,
""  [flowRPM] 
)

◆ TEST_CASE() [17/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM statusKey maps parse statuses consistently"  ,
""  [flowRPM] 
)

Verify statusKey() maps every parser status to a stable log key.

Definition at line 842 of file flowRPM_test.cpp.

References MagAOX::app::flowRPM::statusKey().

◆ TEST_CASE() [18/18]

libXWCTest::flowRPMTest::TEST_CASE ( "flowRPM timestamp parsing covers valid and malformed inputs"  ,
""  [flowRPM] 
)

Verify parseTimestamp() accepts valid input and rejects malformed timestamps.

Definition at line 259 of file flowRPM_test.cpp.

References MagAOX::app::flowRPM::parseTimestamp().