diff options
author | Carl Hetherington <carl@carlh.net> | 2012-06-09 23:07:27 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-06-09 23:07:27 +0000 |
commit | 1dc8d99d78908222545e78f41cff08896f46a529 (patch) | |
tree | ac30ffe2ceacd9db700fd15a36b2dfad45808284 /libs/ardour/test/audio_region_test.h | |
parent | a715e566d03b5e1a68856ec0c24d59ed8610b768 (diff) |
Clean up libardour tests a bit.
git-svn-id: svn://localhost/ardour2/branches/3.0@12641 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/test/audio_region_test.h')
-rw-r--r-- | libs/ardour/test/audio_region_test.h | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/libs/ardour/test/audio_region_test.h b/libs/ardour/test/audio_region_test.h index e746b19ef3..29ea51caa6 100644 --- a/libs/ardour/test/audio_region_test.h +++ b/libs/ardour/test/audio_region_test.h @@ -1,15 +1,50 @@ -#include "ardour/types.h" -#include "test_needing_playlist_and_regions.h" +/* + Copyright (C) 2012 Paul Davis -class AudioRegionTest : public TestNeedingPlaylistAndRegions -{ - CPPUNIT_TEST_SUITE (AudioRegionTest); - CPPUNIT_TEST (readTest); - CPPUNIT_TEST_SUITE_END (); + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <boost/shared_ptr.hpp> +#include "test_needing_session.h" + +namespace ARDOUR { + class Playlist; + class AudioPlaylist; + class Source; + class Region; + class AudioRegion; +} + +/** A parent class for tests which offers some audio regions, + * each with a staircase waveform within them. + */ +class AudioRegionTest : public TestNeedingSession +{ public: - void readTest (); + virtual void setUp (); + virtual void tearDown (); -private: - void check_staircase (ARDOUR::Sample *, int, int); +protected: + boost::shared_ptr<ARDOUR::Playlist> _playlist; + /** AudioPlaylist downcast of _playlist */ + boost::shared_ptr<ARDOUR::AudioPlaylist> _audio_playlist; + boost::shared_ptr<ARDOUR::Source> _source; + /** 16 regions, of length 100, each referencing a source which is 4096 + * frames of a staircase waveform. + */ + boost::shared_ptr<ARDOUR::Region> _r[16]; + /** AudioRegion downcasts of _r[] */ + boost::shared_ptr<ARDOUR::AudioRegion> _ar[16]; }; |