From bb653c64598b1809cd73b1104064e9e3e4aad27b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 19 Jul 2002 14:08:36 +0000 Subject: [PATCH] Migrated the BMessenger tests to the new test framework. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@333 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/kits/app/AppKitTestAddon.cpp | 20 ++++++++++++++++ src/tests/kits/app/Jamfile | 24 ++++++++++++++++++- .../kits/app/bmessenger/MessengerTest.cpp | 15 ++++++++++++ src/tests/kits/app/bmessenger/MessengerTest.h | 9 +++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 src/tests/kits/app/AppKitTestAddon.cpp create mode 100644 src/tests/kits/app/bmessenger/MessengerTest.cpp create mode 100644 src/tests/kits/app/bmessenger/MessengerTest.h diff --git a/src/tests/kits/app/AppKitTestAddon.cpp b/src/tests/kits/app/AppKitTestAddon.cpp new file mode 100644 index 0000000000..774f469c6c --- /dev/null +++ b/src/tests/kits/app/AppKitTestAddon.cpp @@ -0,0 +1,20 @@ +#include +#include + +// ##### Include headers for your tests here ##### +//#include "bhandler/HandlerTest.h" +//#include "blooper/LooperTest.h" +//#include "bmessagequeue/MessageQueueTest.h" +#include "bmessenger/MessengerTest.h" + +BTestSuite* getTestSuite() { + BTestSuite *suite = new BTestSuite("App"); + + // ##### Add test suites here ##### +// suite->addTest("BHandler", HandlerTestSuite()); +// suite->addTest("BLooper", LooperTestSuite()); +// suite->addTest("BMessageQueue", MessageQueueTestSuite()); + suite->addTest("BMessenger", MessengerTestSuite()); + + return suite; +} diff --git a/src/tests/kits/app/Jamfile b/src/tests/kits/app/Jamfile index 4b73d34f79..9efe17cafd 100644 --- a/src/tests/kits/app/Jamfile +++ b/src/tests/kits/app/Jamfile @@ -1,6 +1,28 @@ SubDir OBOS_TOP src tests kits app ; +# Let Jam know where to find some of our source files +#SEARCH_SOURCE += [ FDirName $(SUBDIR) bhandler ] ; +#SEARCH_SOURCE += [ FDirName $(SUBDIR) blooper ] ; +#SEARCH_SOURCE += [ FDirName $(SUBDIR) bmessagequeue ] ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) bmessenger ] ; + +CommonTestLib libapptest.so + : AppKitTestAddon.cpp + + # BMessenger + MessengerTest.cpp + BMessengerTester.cpp + LockTargetTester.cpp + TargetTester.cpp + + : libopenbeos.so + be stdc++.r4 + : be stdc++.r4 + : + : app support +; + SubInclude OBOS_TOP src tests kits app bhandler ; SubInclude OBOS_TOP src tests kits app blooper ; #SubInclude OBOS_TOP src tests kits app bmessageQueue ; -SubInclude OBOS_TOP src tests kits app bmessenger ; +#SubInclude OBOS_TOP src tests kits app bmessenger ; diff --git a/src/tests/kits/app/bmessenger/MessengerTest.cpp b/src/tests/kits/app/bmessenger/MessengerTest.cpp new file mode 100644 index 0000000000..4dd0cdfc36 --- /dev/null +++ b/src/tests/kits/app/bmessenger/MessengerTest.cpp @@ -0,0 +1,15 @@ +#include "../common.h" +#include "BMessengerTester.h" +#include "LockTargetTester.h" +#include "TargetTester.h" + +CppUnit::Test* MessengerTestSuite() +{ + CppUnit::TestSuite *testSuite = new CppUnit::TestSuite(); + + testSuite->addTest(LockTargetTester::Suite()); + testSuite->addTest(TBMessengerTester::Suite()); + testSuite->addTest(TargetTester::Suite()); + + return testSuite; +} diff --git a/src/tests/kits/app/bmessenger/MessengerTest.h b/src/tests/kits/app/bmessenger/MessengerTest.h new file mode 100644 index 0000000000..c0359ede65 --- /dev/null +++ b/src/tests/kits/app/bmessenger/MessengerTest.h @@ -0,0 +1,9 @@ +#ifndef _messenger_test_h_ +#define _messenger_test_h_ + +class CppUnit::Test; + +CppUnit::Test* MessengerTestSuite(); + +#endif // _messenger_test_h_ +