API
 
Loading...
Searching...
No Matches
smc100ccCtrl_test.cpp
Go to the documentation of this file.
1/** \file smc100ccCtrl_test.cpp
2 * \brief Catch2 tests for the smc100ccCtrl app.
3 * \author Jared R. Males (jaredmales@gmail.com)
4 *
5 * \ingroup smc100ccCtrl_files
6 */
7
8#include "../../../tests/testXWC.hpp"
9#include "../../../tests/testMacrosINDI.hpp"
10
11#include "../smc100ccCtrl.hpp"
12
13using namespace MagAOX::app;
14
15namespace libXWCTest
16{
17
18/** \defgroup smc100ccCtrl_unit_test smc100ccCtrl Unit Tests
19 * \brief Unit tests for the smc100ccCtrl application.
20 *
21 * \ingroup application_unit_test
22 */
23
24/// Namespace for `smc100ccCtrl` unit tests.
25/** \ingroup smc100ccCtrl_unit_test
26 */
27namespace smc100ccCtrlTest
28{
29
30/// \cond DOXYGEN_SUPPRESS_TEST_HARNESS
31class smc100ccCtrl_test : public smc100ccCtrl
32{
33 public:
34 smc100ccCtrl_test( const std::string device )
35 {
36 m_configName = device;
37
39
41 XWCTEST_SETUP_INDI_NEW_PROP( presetName );
44 }
45};
46/// \endcond
47
48/// Verify the smc100ccCtrl INDI callback validators accept only the expected properties.
49/**
50 * \ingroup smc100ccCtrl_unit_test
51 */
52TEST_CASE( "smc100ccCtrl INDI callbacks validate device and property names", "[smc100ccCtrl]" )
53{
54 // clang-format off
55 #ifdef SMC100CCCTRL_TEST_DOXYGEN_REF
56 smc100ccCtrl::newCallBack_m_indiP_position( pcf::IndiProperty() );
57 smc100ccCtrl::newCallBack_m_indiP_preset( pcf::IndiProperty() );
58 smc100ccCtrl::newCallBack_m_indiP_presetName( pcf::IndiProperty() );
59 smc100ccCtrl::newCallBack_m_indiP_home( pcf::IndiProperty() );
60 smc100ccCtrl::newCallBack_m_indiP_stop( pcf::IndiProperty() );
61 #endif
62 // clang-format on
63
69}
70
71} // namespace smc100ccCtrlTest
72
73} // namespace libXWCTest
TEST_CASE("smc100ccCtrl INDI callbacks validate device and property names", "[smc100ccCtrl]")
Verify the smc100ccCtrl INDI callback validators accept only the expected properties.
#define XWCTEST_INDI_NEW_CALLBACK(testclass, propname)
Catch-2 tests for whether a NEW callback properly validates the input property properly.
Namespace for all libXWC tests.
#define XWCTEST_SETUP_INDI_NEW_PROP(propname)