From fa8d0268eb9488530a9544bd0ed2631636b129b7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 20 Jan 2013 18:23:42 +0000 Subject: [PATCH] Fix compilation with --test. Make midnam test suite pass again. The Ardour test suite does not pass. I commented out old crossfade stuff, but I am not familiar enough with the parts that fail to fix it. It might be a good idea for someone to look into this. Ideally we'd have the test integrated into everyone's workflow, but they add quite a few files to compile... git-svn-id: svn://localhost/ardour2/branches/3.0@13931 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/run-tests.sh | 2 +- libs/ardour/test/combine_regions_test.cc | 5 ++++- libs/ardour/test/playlist_read_test.cc | 6 +++++- libs/evoral/test/SequenceTest.cpp | 4 ++-- libs/midi++2/run-tests.sh | 3 +-- libs/midi++2/test/MidnamTest.cpp | 18 +++++++++--------- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/libs/ardour/run-tests.sh b/libs/ardour/run-tests.sh index 768cced8b1..b31751991c 100755 --- a/libs/ardour/run-tests.sh +++ b/libs/ardour/run-tests.sh @@ -14,7 +14,7 @@ cd build libs='libs' -export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/appleutility:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$libs/timecode:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/appleutility:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$libs/timecode:$libs/libltc:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH export ARDOUR_CONFIG_PATH=$top:$top/gtk2_ardour:$libs/..:$libs/../gtk2_ardour export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap diff --git a/libs/ardour/test/combine_regions_test.cc b/libs/ardour/test/combine_regions_test.cc index 385a6e852f..0202fe8873 100644 --- a/libs/ardour/test/combine_regions_test.cc +++ b/libs/ardour/test/combine_regions_test.cc @@ -113,11 +113,13 @@ CombineRegionsTest::crossfadeTest1 () CPPUNIT_ASSERT_EQUAL (layer_t (0), _r[0]->layer ()); CPPUNIT_ASSERT_EQUAL (layer_t (1), _r[1]->layer ()); +#if 0 /* Check that the right fades have been set up */ CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_in_is_xfade ()); CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_out_is_xfade ()); CPPUNIT_ASSERT_EQUAL (true, _ar[1]->fade_in_is_xfade ()); CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_out_is_xfade ()); +#endif /* Check that the read comes back correctly */ check_crossfade1 (); @@ -217,12 +219,13 @@ CombineRegionsTest::crossfadeTest2 () CPPUNIT_ASSERT_EQUAL (layer_t (1), _r[0]->layer ()); CPPUNIT_ASSERT_EQUAL (layer_t (0), _r[1]->layer ()); +#if 0 /* Check that the right fades have been set up */ - CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_in_is_xfade ()); CPPUNIT_ASSERT_EQUAL (true, _ar[0]->fade_out_is_xfade ()); CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_in_is_xfade ()); CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_out_is_xfade ()); +#endif /* Check that the read comes back correctly */ check_crossfade2 (); diff --git a/libs/ardour/test/playlist_read_test.cc b/libs/ardour/test/playlist_read_test.cc index a1b4579e8a..54b0bc4fd5 100644 --- a/libs/ardour/test/playlist_read_test.cc +++ b/libs/ardour/test/playlist_read_test.cc @@ -39,7 +39,7 @@ PlaylistReadTest::setUp () _mbuf = new Sample[_N]; _gbuf = new float[_N]; - _session->config.set_auto_xfade (false); + //_session->config.set_auto_xfade (false); for (int i = 0; i < _N; ++i) { _buf[i] = 0; @@ -97,17 +97,21 @@ PlaylistReadTest::overlappingReadTest () CPPUNIT_ASSERT_EQUAL (double (64), _ar[0]->_fade_out->back()->when); _ar[0]->set_length (1024); +#if 0 /* Note: these are ordinary fades, not xfades */ CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_in_is_xfade()); CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_out_is_xfade()); +#endif _audio_playlist->add_region (_ar[1], 128); _ar[1]->set_default_fade_in (); _ar[1]->set_default_fade_out (); +#if 0 /* Note: these are ordinary fades, not xfades */ CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_in_is_xfade()); CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_out_is_xfade()); +#endif CPPUNIT_ASSERT_EQUAL (double (64), _ar[1]->_fade_in->back()->when); CPPUNIT_ASSERT_EQUAL (double (64), _ar[1]->_fade_out->back()->when); diff --git a/libs/evoral/test/SequenceTest.cpp b/libs/evoral/test/SequenceTest.cpp index 6523675b0f..69931b8e0d 100644 --- a/libs/evoral/test/SequenceTest.cpp +++ b/libs/evoral/test/SequenceTest.cpp @@ -77,12 +77,12 @@ SequenceTest::iteratorSeekTest () bool on = true; for (Sequence