2 Copyright (C) 2012 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #include "ardour/playlist.h"
20 #include "ardour/region.h"
21 #include "playlist_layering_test.h"
23 CPPUNIT_TEST_SUITE_REGISTRATION (PlaylistLayeringTest);
26 using namespace ARDOUR;
29 PlaylistLayeringTest::basicsTest ()
31 _playlist->add_region (_r[0], 0);
32 _playlist->add_region (_r[1], 10);
33 _playlist->add_region (_r[2], 20);
35 CPPUNIT_ASSERT_EQUAL (layer_t (0), _r[0]->layer ());
36 CPPUNIT_ASSERT_EQUAL (layer_t (1), _r[1]->layer ());
37 CPPUNIT_ASSERT_EQUAL (layer_t (2), _r[2]->layer ());
39 _r[0]->set_position (5);
41 /* region move should have no effect */
42 CPPUNIT_ASSERT_EQUAL (layer_t (0), _r[0]->layer ());
43 CPPUNIT_ASSERT_EQUAL (layer_t (1), _r[1]->layer ());
44 CPPUNIT_ASSERT_EQUAL (layer_t (2), _r[2]->layer ());