diff options
author | Carl Hetherington <carl@carlh.net> | 2012-05-12 19:34:02 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-05-12 19:34:02 +0000 |
commit | 7d09c5627b496ed5861de15fdcb23dbc42410082 (patch) | |
tree | 36ffb9f92ca6386cf50e455961af9be6ce2080a1 /libs/ardour/test | |
parent | 5f0633594878836fd29c706cc72ac9cec3547ca7 (diff) |
Add test for strange boost-related crash.
git-svn-id: svn://localhost/ardour2/branches/3.0@12261 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/test')
-rw-r--r-- | libs/ardour/test/control_surfaces_test.cc | 23 | ||||
-rw-r--r-- | libs/ardour/test/control_surfaces_test.h | 11 | ||||
-rw-r--r-- | libs/ardour/test/test_needing_session.cc | 7 |
3 files changed, 40 insertions, 1 deletions
diff --git a/libs/ardour/test/control_surfaces_test.cc b/libs/ardour/test/control_surfaces_test.cc new file mode 100644 index 0000000000..82127a2524 --- /dev/null +++ b/libs/ardour/test/control_surfaces_test.cc @@ -0,0 +1,23 @@ +#include "control_surfaces_test.h" +#include "ardour/control_protocol_manager.h" +#include "ardour/session.h" + +CPPUNIT_TEST_SUITE_REGISTRATION (ControlSurfacesTest); + +using namespace std; +using namespace ARDOUR; + +void +ControlSurfacesTest::instantiateAndTeardownTest () +{ + cout << "HELLO!\n"; + _session->new_audio_track (1, 2, Normal, 0, 1, "Test"); + + ControlProtocolManager& m = ControlProtocolManager::instance (); + cout << "CST: Test " << m.control_protocol_info.size() << "\n"; + for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) { + cout << "CST: Test " << (*i)->name << "\n"; + m.instantiate (**i); + m.teardown (**i); + } +} diff --git a/libs/ardour/test/control_surfaces_test.h b/libs/ardour/test/control_surfaces_test.h new file mode 100644 index 0000000000..97662c6ea3 --- /dev/null +++ b/libs/ardour/test/control_surfaces_test.h @@ -0,0 +1,11 @@ +#include "test_needing_session.h" + +class ControlSurfacesTest : public TestNeedingSession +{ + CPPUNIT_TEST_SUITE (ControlSurfacesTest); + CPPUNIT_TEST (instantiateAndTeardownTest); + CPPUNIT_TEST_SUITE_END (); + +public: + void instantiateAndTeardownTest (); +}; diff --git a/libs/ardour/test/test_needing_session.cc b/libs/ardour/test/test_needing_session.cc index ea63978251..625d5735b2 100644 --- a/libs/ardour/test/test_needing_session.cc +++ b/libs/ardour/test/test_needing_session.cc @@ -6,6 +6,8 @@ #include "ardour/audioengine.h" #include "test_needing_session.h" +extern void setup_libpbd_enums (); + using namespace std; using namespace ARDOUR; using namespace PBD; @@ -57,13 +59,16 @@ TestNeedingSession::setUp () init (false, true); SessionEvent::create_per_thread_pool ("test", 512); + setup_libpbd_enums (); + test_receiver.listen_to (error); test_receiver.listen_to (info); test_receiver.listen_to (fatal); test_receiver.listen_to (warning); AudioEngine* engine = new AudioEngine ("test", ""); - MIDI::Manager::create (engine->jack ()); + init_post_engine (); + CPPUNIT_ASSERT (engine->start () == 0); _session = new Session (*engine, test_session_path, "test_session"); |