Revert "Use make_shared<>."
[dcpomatic.git] / test / vf_test.cc
index 904f1d559ca9c692d73ab75505110aa73acd3b9f..ae7c30be3063fb443242bcdc93817bb4b577e5fd 100644 (file)
@@ -1,19 +1,20 @@
 /*
     Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
 
-    This program is free software; you can redistribute it and/or modify
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic 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,
+    DCP-o-matic 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.
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 
@@ -22,6 +23,7 @@
 #include "lib/ffmpeg_content.h"
 #include "test.h"
 #include <boost/test/unit_test.hpp>
+#include <boost/foreach.hpp>
 
 using std::list;
 using std::string;
@@ -46,7 +48,8 @@ BOOST_AUTO_TEST_CASE (vf_test1)
        film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
        BOOST_CHECK (dcp->can_reference_video(why_not));
        BOOST_CHECK (dcp->can_reference_audio(why_not));
-       BOOST_CHECK (dcp->can_reference_subtitle(why_not));
+       /* (but reels_test2 has no subtitles to reference) */
+       BOOST_CHECK (!dcp->can_reference_subtitle(why_not));
 
        shared_ptr<FFmpegContent> other (new FFmpegContent (film, "test/data/test.mp4"));
        film->examine_and_add_content (other);
@@ -62,5 +65,6 @@ BOOST_AUTO_TEST_CASE (vf_test1)
        other->set_position (dcp->end ());
        BOOST_CHECK (dcp->can_reference_video(why_not));
        BOOST_CHECK (dcp->can_reference_audio(why_not));
-       BOOST_CHECK (dcp->can_reference_subtitle(why_not));
+       /* (reels_test2 has no subtitles to reference) */
+       BOOST_CHECK (!dcp->can_reference_subtitle(why_not));
 }