Fix silent stereo mixdown exports when the project audio channel count is > 6.
[dcpomatic.git] / test / film_test.cc
1 /*
2     Copyright (C) 2023 Carl Hetherington <cth@carlh.net>
3
4     This file is part of DCP-o-matic.
5
6     DCP-o-matic is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     DCP-o-matic is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
18
19 */
20
21
22 #include "lib/content_factory.h"
23 #include "lib/film.h"
24 #include "test.h"
25 #include <boost/test/unit_test.hpp>
26
27
28 BOOST_AUTO_TEST_CASE(film_contains_atmos_content_test)
29 {
30         auto atmos = content_factory("test/data/atmos_0.mxf")[0];
31         auto image = content_factory("test/data/flat_red.png")[0];
32         auto sound = content_factory("test/data/white.wav")[0];
33
34         auto film1 = new_test_film2("film_contains_atmos_content_test1", { atmos, image, sound });
35         BOOST_CHECK(film1->contains_atmos_content());
36
37         auto film2 = new_test_film2("film_contains_atmos_content_test2", { sound, atmos, image });
38         BOOST_CHECK(film2->contains_atmos_content());
39
40         auto film3 = new_test_film2("film_contains_atmos_content_test3", { image, sound, atmos });
41         BOOST_CHECK(film3->contains_atmos_content());
42
43         auto film4 = new_test_film2("film_contains_atmos_content_test4", { image, sound });
44         BOOST_CHECK(!film4->contains_atmos_content());
45 }
46