20 #include <cppunit/ui/text/TestRunner.h> 21 #include <cppunit/TextOutputter.h> 22 #include <cppunit/extensions/TestFactoryRegistry.h> 23 #include <cppunit/extensions/HelperMacros.h> 24 #include <cppunit/TestAssert.h> 26 #include <coil/Signal.h> 37 :
public CppUnit::TestFixture
134 SIGINT, SIGILL, SIGABRT, SIGFPE, SIGSEGV,
139 for (index = 0; sn[
index]; index++) {
155 CPPUNIT_ASSERT_EQUAL(Signum, aSignum);
166 int main(
int argc,
char* argv[])
168 CppUnit::TextUi::TestRunner runner;
169 runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
170 CppUnit::Outputter* outputter =
171 new CppUnit::TextOutputter(&runner.result(), std::cout);
172 runner.setOutputter(outputter);
179 __sighandler_t signal(
int __sig, __sighandler_t __handler)
182 std::cout <<
"Hello, Signal" << std::endl;
int main(int argc, char **argv)
void test_SignalAction_test()
Constractor with 3 paramater.
CPPUNIT_TEST(test_SignalAction_constructor_1)
void checkSignalAction()
Set SignalAction for Linux.
static void signalHandler(int aSignum)
OSから渡されたシグナル番号と、予定されていたシグナル番号を比較検証する。
void(* SignalHandler)(int)
virtual void tearDown()
Test finalization.
CPPUNIT_TEST_SUITE(SignalTests)
ACE_Sig_Action SignalAction
void test_SignalAction_constructor_2()
Constractor with 2 paramater.
virtual void setUp()
Test initialization.
SignalTests()
Constructor.
void test_SignalAction_constructor_1()
Constractor with no paramater.
~SignalTests()
Destructor.
CPPUNIT_TEST_SUITE_REGISTRATION(Signal::SignalTests)