Missing files.
git-svn-id: svn://localhost/ardour2/branches/3.0@9075 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
98248aeb68
commit
b20a139129
33
libs/pbd/test/signals_test.cc
Normal file
33
libs/pbd/test/signals_test.cc
Normal file
@ -0,0 +1,33 @@
|
||||
#include "signals_test.h"
|
||||
#include "pbd/signals.h"
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION (SignalsTest);
|
||||
|
||||
class Emitter {
|
||||
public:
|
||||
void emit () {
|
||||
Fred ();
|
||||
}
|
||||
|
||||
PBD::Signal0<void> Fred;
|
||||
};
|
||||
|
||||
void
|
||||
receiver ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
SignalsTest::testDestruction ()
|
||||
{
|
||||
Emitter* e = new Emitter;
|
||||
PBD::ScopedConnection c;
|
||||
e->Fred.connect_same_thread (c, boost::bind (&receiver));
|
||||
e->emit ();
|
||||
delete e;
|
||||
c.disconnect ();
|
||||
|
||||
CPPUNIT_ASSERT (true);
|
||||
}
|
||||
|
12
libs/pbd/test/signals_test.h
Normal file
12
libs/pbd/test/signals_test.h
Normal file
@ -0,0 +1,12 @@
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
class SignalsTest : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE (SignalsTest);
|
||||
CPPUNIT_TEST (testDestruction);
|
||||
CPPUNIT_TEST_SUITE_END ();
|
||||
|
||||
public:
|
||||
void testDestruction ();
|
||||
};
|
Loading…
Reference in New Issue
Block a user