3#define BOOST_TEST_MODULE testTestFaciliy2
4#include <boost/test/included/unit_test.hpp>
5using namespace boost::unit_test_framework;
17 using ctk::ApplicationModule::ApplicationModule;
23 std::cout <<
"starting main loop" << std::endl;
55 BOOST_CHECK_CLOSE(testFacility.
readScalar<
double>(
"/output"), 50., 0.001);
58 std::cout <<
"about to step" << std::endl;
61 std::cout <<
"step finished" << std::endl;
63 BOOST_CHECK_CLOSE(testFacility.
readScalar<
double>(
"/output"), 90., 0.001);
void shutdown() override
This will remove the global pointer to the instance and allows creating another instance afterwards.
bool write(ChimeraTK::VersionNumber versionNumber)=delete
Helper class to facilitate tests of applications based on ApplicationCore.
TYPE readScalar(const std::string &name)
Convenience function to read the latest value of a scalar process variable in a single call.
void writeScalar(const std::string &name, TYPE value)
Convenience function to write a scalar process variable in a single call.
void stepApplication(bool waitForDeviceInitialisation=true) const
Perform a "step" of the application.
void runApplication() const
Start the application in testable mode.
void setScalarDefault(const ChimeraTK::RegisterPath &name, const T &value)
Set default value for scalar process variable.
InvalidityTracer application module.
BOOST_AUTO_TEST_CASE(testSumLimiter)
Convenience class for output scalar accessors (always UpdateMode::push)
void mainLoop() override
To be implemented by the user: function called in a separate thread executing the main loop of the mo...
ctk::ScalarPushInput< double > input
ctk::ScalarOutput< double > output