API
 
Loading...
Searching...
No Matches
cacaoInterface_test.cpp
Go to the documentation of this file.
1/** \file cacaoInterface_test.cpp
2 * \brief Catch2 tests for the cacaoInterface app.
3 * \author Jared R. Males (jaredmales@gmail.com)
4 *
5 * \ingroup cacaoInterface_files
6 */
7
8#include "../../../tests/testXWC.hpp"
9#include "../../../tests/testMacrosINDI.hpp"
10
11#include "../cacaoInterface.hpp"
12
13using namespace MagAOX::app;
14
15namespace libXWCTest
16{
17
18/** \defgroup cacaoInterface_unit_test cacaoInterface Unit Tests
19 * \brief Unit tests for the cacaoInterface application.
20 *
21 * \ingroup application_unit_test
22 */
23
24/// Namespace for `cacaoInterface` unit tests.
25/** \ingroup cacaoInterface_unit_test
26 */
27namespace cacaoInterfaceTest
28{
29
30/// \cond DOXYGEN_SUPPRESS_TEST_HARNESS
31class cacaoInterface_test : public cacaoInterface
32{
33 public:
34 cacaoInterface_test( const std::string device )
35 {
36 m_configName = device;
37
38 XWCTEST_SETUP_INDI_NEW_PROP( loopState );
41 XWCTEST_SETUP_INDI_NEW_PROP( multCoeff );
43 }
44};
45/// \endcond
46
47/// Verify the cacaoInterface INDI callback validators accept only the expected properties.
48/**
49 * \ingroup cacaoInterface_unit_test
50 */
51TEST_CASE( "cacaoInterface INDI callbacks validate device and property names", "[cacaoInterface]" )
52{
53 // clang-format off
54 #ifdef CACAOINTERFACE_TEST_DOXYGEN_REF
55 cacaoInterface::newCallBack_m_indiP_loopState( pcf::IndiProperty() );
56 cacaoInterface::newCallBack_m_indiP_loopGain( pcf::IndiProperty() );
57 cacaoInterface::newCallBack_m_indiP_loopZero( pcf::IndiProperty() );
58 cacaoInterface::newCallBack_m_indiP_multCoeff( pcf::IndiProperty() );
59 cacaoInterface::newCallBack_m_indiP_maxLim( pcf::IndiProperty() );
60 #endif
61 // clang-format on
62
68}
69
70} // namespace cacaoInterfaceTest
71
72} // namespace libXWCTest
The MagAO-X CACAO Interface.
TEST_CASE("cacaoInterface INDI callbacks validate device and property names", "[cacaoInterface]")
Verify the cacaoInterface 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)