b20a139129
git-svn-id: svn://localhost/ardour2/branches/3.0@9075 d708f5d6-7413-0410-9779-e7cbd77b26cf
34 lines
430 B
C++
34 lines
430 B
C++
#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);
|
|
}
|
|
|