API
 
Loading...
Searching...
No Matches
closedLoopIndi_test.cpp
Go to the documentation of this file.
1/** \file template_test.cpp
2 * \brief Catch2 tests for the template app.
3 *
4 * History:
5 */
6#include "../../../tests/catch2/catch.hpp"
7#include "../../tests/testMacrosINDI.hpp"
8
9#include "../closedLoopIndi.hpp"
10
11using namespace MagAOX::app;
12
14{
15
17{
18
19public:
20 closedLoopIndi_test(const std::string device)
21 {
22 m_configName = device;
23
27 XWCTEST_SETUP_INDI_NEW_PROP(ctrlEnabled);
28 XWCTEST_SETUP_INDI_NEW_PROP(counterReset);
29
30 XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_inputs, "inputdev", "measurement" )
31 XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_ctrl0_fsm, "ctrl0dev", "fsm" )
32 XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_ctrl0, "ctrl0dev", "prop0" )
33 XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_ctrl1_fsm, "ctrl1dev", "fsm" )
34 XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_ctrl1, "ctrl1dev", "prop1" )
35 XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_upstream, "updev", "loop_state" )
36 }
37};
38
39
40
41SCENARIO( "INDI Callbacks", "[closedLoopIndi]" )
42{
48 XWCTEST_INDI_SET_CALLBACK( closedLoopIndi, m_indiP_inputs, "inputdev", "measurement")
49 XWCTEST_INDI_SET_CALLBACK( closedLoopIndi, m_indiP_ctrl0_fsm, "ctrl0dev", "fsm")
50 XWCTEST_INDI_SET_CALLBACK( closedLoopIndi, m_indiP_ctrl0, "ctrl0dev", "prop0")
51 XWCTEST_INDI_SET_CALLBACK( closedLoopIndi, m_indiP_ctrl1_fsm, "ctrl1dev", "fsm")
52 XWCTEST_INDI_SET_CALLBACK( closedLoopIndi, m_indiP_ctrl1, "ctrl1dev", "prop1")
53 XWCTEST_INDI_SET_CALLBACK( closedLoopIndi, m_indiP_upstream, "updev", "loop_state")
54}
55
56
57} //namespace closedLoopIndi_test
#define SCENARIO(...)
Definition catch.hpp:17760
The MagAO-X application to do closed-loop control using INDI properties.
#define XWCTEST_INDI_SET_CALLBACK(testclass, varname, device, propname)
Catch-2 tests for whether a SET callback properly validates the input property properly.
#define XWCTEST_INDI_NEW_CALLBACK(testclass, propname)
Catch-2 tests for whether a NEW callback properly validates the input property properly.
#define XWCTEST_SETUP_INDI_ARB_PROP(varname, device, propname)
#define XWCTEST_SETUP_INDI_NEW_PROP(propname)