25 #include <boost/scoped_ptr.hpp> 29 using namespace boost;
41 logger = Logger::Instance();
51 :
public RunnableInterface
58 log(
Info) <<
"Hello this is the world speaking elaborately and lengthy...!" <<
endlog();
71 BOOST_CHECK( logger != 0 );
79 Logger::log() <<
"Test Log Environment variable : Two ";
81 Logger::log() <<
"Test Log Environment variable : Two" << Logger::nl;
84 Logger::log() <<
"Test Log Environment variable : nl" << Logger::nl;
85 Logger::log() <<
"Test Log Environment variable : flush" << flush;
92 log() <<
"Test Log Environment variable : Single line" <<
endlog(
Debug);
93 log() <<
"Test Log Environment variable : Two ";
94 log() <<
"lines on one line." <<
endlog();
95 log() <<
"Test Log Environment variable : Two" <<
nlog();
96 log() <<
"lines on two lines." <<
endlog();
98 log() <<
"Test Log Environment variable : nl" <<
nlog();
99 log() <<
"Test Log Environment variable : flush" <<
flushlog();
105 boost::scoped_ptr<TestLog> run(
new TestLog() );
106 boost::scoped_ptr<ActivityInterface> t(
new Activity(25, 0.001, 0,
"ORActivity1") );
107 boost::scoped_ptr<TestLog> run2(
new TestLog() );
108 boost::scoped_ptr<ActivityInterface> t2(
new Activity(25, 0.001, 0,
"ORActivity2") );
111 t2->run( run2.get() );
static Logger::LogFunction flushlog()
static Logger::LogFunction nlog()
#define BOOST_FIXTURE_TEST_SUITE(suite_name, F)
BOOST_AUTO_TEST_CASE(testStartStop)
#define BOOST_AUTO_TEST_SUITE_END()
basic_ostreams & endl(basic_ostreams &s)
An Activity executes a RunnableInterface object in a (periodic) thread.
unsigned int sleep(unsigned int s)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
static Logger::LogFunction endlog()