summaryrefslogtreecommitdiff
path: root/test/notifiertest.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-06-16 18:05:00 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-06-16 18:15:59 +0200
commit2abc107b24f73b8c4664189c34196d9a27a3e339 (patch)
treeb7067a45f7294dbd143c410bdfb690157c976e3c /test/notifiertest.cc
parente694a23ab28686ecc0635c2ac8c625e743b89a3b (diff)
Port the rest of the unittests to DGUnit and remove the CppUnit dependency.
Diffstat (limited to 'test/notifiertest.cc')
-rw-r--r--test/notifiertest.cc28
1 files changed, 13 insertions, 15 deletions
diff --git a/test/notifiertest.cc b/test/notifiertest.cc
index 2b2e92e..fe00597 100644
--- a/test/notifiertest.cc
+++ b/test/notifiertest.cc
@@ -24,7 +24,7 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include <cppunit/extensions/HelperMacros.h>
+#include "dgunit.h"
#include <vector>
@@ -48,15 +48,13 @@ public:
};
class NotifierTest
- : public CppUnit::TestFixture
+ : public DGUnit
{
- CPPUNIT_TEST_SUITE(NotifierTest);
- CPPUNIT_TEST(testTest);
- CPPUNIT_TEST_SUITE_END();
-
public:
- void setUp() { }
- void tearDown() { }
+ NotifierTest()
+ {
+ DGUNIT_TEST(NotifierTest::testTest);
+ }
//! This just creates some drumkit.
void testTest()
@@ -73,9 +71,9 @@ public:
std::vector<Probe*> ref;
ref.push_back(&foo1);
ref.push_back(&foo2);
- CPPUNIT_ASSERT_EQUAL(ref.size(), triggers.size());
- CPPUNIT_ASSERT_EQUAL(ref[0], triggers[0]);
- CPPUNIT_ASSERT_EQUAL(ref[1], triggers[1]);
+ DGUNIT_ASSERT_EQUAL(ref.size(), triggers.size());
+ DGUNIT_ASSERT_EQUAL(ref[0], triggers[0]);
+ DGUNIT_ASSERT_EQUAL(ref[1], triggers[1]);
notifier.disconnect(&foo1);
notifier.disconnect(&foo2);
triggers.clear();
@@ -88,9 +86,9 @@ public:
std::vector<Probe*> ref;
ref.push_back(&foo2);
ref.push_back(&foo1);
- CPPUNIT_ASSERT_EQUAL(ref.size(), triggers.size());
- CPPUNIT_ASSERT_EQUAL(ref[0], triggers[0]);
- CPPUNIT_ASSERT_EQUAL(ref[1], triggers[1]);
+ DGUNIT_ASSERT_EQUAL(ref.size(), triggers.size());
+ DGUNIT_ASSERT_EQUAL(ref[0], triggers[0]);
+ DGUNIT_ASSERT_EQUAL(ref[1], triggers[1]);
notifier.disconnect(&foo1);
notifier.disconnect(&foo2);
triggers.clear();
@@ -100,4 +98,4 @@ public:
};
// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION(NotifierTest);
+static NotifierTest test;