26 #include <cppunit/ui/text/TestRunner.h> 27 #include <cppunit/TextOutputter.h> 28 #include <cppunit/extensions/TestFactoryRegistry.h> 29 #include <cppunit/extensions/HelperMacros.h> 30 #include <cppunit/TestAssert.h> 33 #include <coil/Guard.h> 34 #include <coil/Task.h> 43 :
public CppUnit::TestFixture ,
67 for(lc=0; lc<100; lc++)
149 sprintf(cstr,
"sharecount:%ld", lc);
150 CPPUNIT_ASSERT_MESSAGE(cstr, (lc== 200) );
165 int main(
int argc,
char* argv[])
167 CppUnit::TextUi::TestRunner runner;
168 runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
169 CppUnit::Outputter* outputter =
170 new CppUnit::TextOutputter(&runner.result(), std::cout);
171 runner.setOutputter(outputter);
void setShareCount(long lc)
virtual void setUp()
Test initialization.
int main(int argc, char **argv)
int svc(void)
Execute thread.
virtual void tearDown()
Test finalization.
virtual int wait(void)
Waiting for the thread terminate.
CPPUNIT_TEST_SUITE(GuardTests)
std::string sprintf(char const *__restrict fmt,...)
Convert it into a format given with an argumen.
int svc(void)
Execute thread.
virtual void activate()
Create a thread.
CPPUNIT_TEST_SUITE_REGISTRATION(Guard::GuardTests)