API
cameraSim_test.cpp
Go to the documentation of this file.
1 /** \file cameraSim_test.cpp
2  * \brief Catch2 tests for the cameraSim 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 "../cameraSim.hpp"
14 
15 using namespace MagAOX::app;
16 
17 namespace SMCTEST
18 {
19 
20 class cameraSim_test : public cameraSim
21 {
22 
23 public:
24  cameraSim_test(const std::string device)
25  {
26  m_configName = device;
27 
28  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, reconfigure)
29  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, temp_ccd )
30  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, temp_controller)
31  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, readout_speed)
32  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, vshift_speed)
33  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, emgain)
34  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, exptime)
35  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, fps)
36  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, synchro)
37  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, mode)
38  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_crop_mode)
39  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_region_x)
40  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_region_y)
41  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_region_w)
42  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_region_h)
43  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_region_bin_x)
44  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_region_bin_y)
45  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_region_check)
46  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_set)
47  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_set_full)
48  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_set_full_bin)
49  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_load_last)
50  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_set_last)
51  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, roi_set_default)
52  XWCTEST_SETUP_INDI_ARB_NEW_PROP(m_indiP_temp, shutter)
53  }
54 };
55 
56 
57 SCENARIO( "INDI Callbacks", "[cameraSim]" )
58 {
59  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, reconfigure);
60  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, temp_ccd);
61  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, temp_controller);
62  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, readout_speed);
63  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, vshift_speed);
64  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, emgain);
65  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, exptime);
66  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, fps);
67  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, synchro);
68  //XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, mode);
69  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_crop_mode);
70  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_region_x);
71  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_region_y);
72  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_region_w);
73  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_region_h);
74  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_region_bin_x);
75  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_region_bin_y);
76  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_region_check);
77  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_set);
78  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_set_full);
79  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_set_full_bin);
80  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_load_last);
81  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_set_last);
82  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, roi_set_default);
83  XWCTEST_INDI_ARBNEW_CALLBACK(cameraSim, newCallBack_stdCamera, shutter);
84 }
85 
86 
87 } //namespace cameraSim_test
cameraSim_test(const std::string device)
#define XWCTEST_INDI_ARBNEW_CALLBACK(testclass, callback, propname)
Catch-2 tests for whether an arbitrary callback properly validates the input property properly.
SCENARIO("INDI Callbacks", "[cameraSim]")
#define XWCTEST_SETUP_INDI_ARB_NEW_PROP(varname, propname)