mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-16 18:36:03 +01:00
Another little test.
git-svn-id: svn://localhost/ardour2/branches/3.0@12037 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5b6721f657
commit
caae89fd9b
2 changed files with 27 additions and 0 deletions
|
|
@ -171,6 +171,31 @@ PlaylistReadTest::transparentReadTest ()
|
|||
}
|
||||
}
|
||||
|
||||
/* A few tests just to check that nothing nasty is happening with
|
||||
memory corruption, really (for running with valgrind).
|
||||
*/
|
||||
void
|
||||
PlaylistReadTest::miscReadTest ()
|
||||
{
|
||||
boost::shared_ptr<AudioRegion> ar0 = boost::dynamic_pointer_cast<AudioRegion> (_region[0]);
|
||||
ar0->set_name ("ar0");
|
||||
_apl->add_region (ar0, 0);
|
||||
ar0->set_default_fade_in ();
|
||||
ar0->set_default_fade_out ();
|
||||
CPPUNIT_ASSERT_EQUAL (double (64), ar0->_fade_in->back()->when);
|
||||
CPPUNIT_ASSERT_EQUAL (double (64), ar0->_fade_out->back()->when);
|
||||
ar0->set_length (128);
|
||||
|
||||
/* Read for just longer than the region */
|
||||
_apl->read (_buf, _mbuf, _gbuf, 0, 129, 0);
|
||||
|
||||
/* Read for much longer than the region */
|
||||
_apl->read (_buf, _mbuf, _gbuf, 0, 1024, 0);
|
||||
|
||||
/* Read one sample */
|
||||
_apl->read (_buf, _mbuf, _gbuf, 53, 54, 0);
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistReadTest::check_staircase (Sample* b, int offset, int N)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ class PlaylistReadTest : public TestNeedingPlaylistAndRegions
|
|||
CPPUNIT_TEST (singleReadTest);
|
||||
CPPUNIT_TEST (overlappingReadTest);
|
||||
CPPUNIT_TEST (transparentReadTest);
|
||||
CPPUNIT_TEST (miscReadTest);
|
||||
CPPUNIT_TEST_SUITE_END ();
|
||||
|
||||
public:
|
||||
|
|
@ -16,6 +17,7 @@ public:
|
|||
void singleReadTest ();
|
||||
void overlappingReadTest ();
|
||||
void transparentReadTest ();
|
||||
void miscReadTest ();
|
||||
|
||||
private:
|
||||
int _N;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue