Fix up tests now that operator= on ScopedConnection disconnects the old connection that it held.

git-svn-id: svn://localhost/ardour2/branches/3.0@12395 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington
2012-05-23 16:22:51 +00:00
parent 4c398b0ad7
commit 99c1aacc23

View File

@@ -42,7 +42,8 @@ SignalsTest::testEmission ()
e->emit ();
CPPUNIT_ASSERT_EQUAL (2, N);
e->Fred.connect_same_thread (c, boost::bind (&receiver));
PBD::ScopedConnection d;
e->Fred.connect_same_thread (d, boost::bind (&receiver));
N = 0;
e->emit ();
CPPUNIT_ASSERT_EQUAL (2, N);
@@ -69,7 +70,6 @@ public:
}
void receiver () {
cout << "Receiver::receiver\n";
++N;
}
};