API
zaberCtrl_test.cpp
Go to the documentation of this file.
1 /** \file zaberCtrl_test.cpp
2  * \brief Catch2 tests for the zaberCtrl app.
3  * \author Jared R. Males (jaredmales@gmail.com)
4  *
5  * History:
6  */
7 
8 
9 
10 #include "../../../tests/catch2/catch.hpp"
11 #include "../../tests/testMacrosINDI.hpp"
12 
13 #include "../zaberCtrl.hpp"
14 
15 using namespace MagAOX::app;
16 
17 namespace ZCTRLTEST
18 {
19 
20 class zaberCtrl_test : public zaberCtrl
21 {
22 
23 public:
24  zaberCtrl_test(const std::string & device)
25  {
26  m_configName = device;
27 
30 
31  //stdMotionStage:
33  XWCTEST_SETUP_INDI_NEW_PROP(presetName);
36 
37  XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_stageState, stest, curr_state);
38  XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_stageMaxRawPos, stest, max_pos);
39  XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_stageRawPos, stest, curr_pos);
40  XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_stageTgtPos, stest, tgt_pos);
41  XWCTEST_SETUP_INDI_ARB_PROP(m_indiP_stageTemp, stest, temp);
42  }
43 };
44 
45 
46 SCENARIO( "INDI Callbacks", "[zaberCtrl]" )
47 {
54 
55  XWCTEST_INDI_SET_CALLBACK( zaberCtrl, m_indiP_stageState, stest, curr_state);
56  XWCTEST_INDI_SET_CALLBACK( zaberCtrl, m_indiP_stageMaxRawPos, stest, max_pos);
57  XWCTEST_INDI_SET_CALLBACK( zaberCtrl, m_indiP_stageRawPos, stest, curr_pos);
58  XWCTEST_INDI_SET_CALLBACK( zaberCtrl, m_indiP_stageTgtPos, stest, tgt_pos);
59  XWCTEST_INDI_SET_CALLBACK( zaberCtrl, m_indiP_stageTemp, stest, temp);
60 
61 }
62 
63 
64 } //namespace zaberCtrl_test
The MagAO-X Zaber Stage Controller.
Definition: zaberCtrl.hpp:38
zaberCtrl_test(const std::string &device)
#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.
SCENARIO("INDI Callbacks", "[zaberCtrl]")
#define XWCTEST_SETUP_INDI_ARB_PROP(varname, device, propname)
#define XWCTEST_SETUP_INDI_NEW_PROP(propname)