#include <boost/filesystem.hpp>
#include "certificates.h"
+namespace xmlpp {
+ class Element;
+ class Node;
+}
+
namespace libdcp {
class Signer
#include <boost/optional.hpp>
#include <boost/filesystem.hpp>
#include <libxml/parser.h>
+#include <libxml++/libxml++.h>
+#include <libcxml/cxml.h>
+#include "../exceptions.h"
namespace libdcp {
namespace xml {
*/
+#include <boost/test/unit_test.hpp>
+#include "certificates.h"
+
+using std::list;
+using boost::shared_ptr;
+
BOOST_AUTO_TEST_CASE (certificates)
{
libdcp::CertificateChain c;
*/
+#include <boost/test/unit_test.hpp>
+
+#include "util.h"
+
/* Check that libdcp::Color works */
BOOST_AUTO_TEST_CASE (color)
{
*/
+#include <boost/test/unit_test.hpp>
+#include "dcp.h"
+#include "metadata.h"
+#include "cpl.h"
+#include "picture_asset.h"
+#include "sound_asset.h"
+#include "reel.h"
+#include "test.h"
+#include "KM_util.h"
+
+using boost::shared_ptr;
+
/* Test creation of a DCP from very simple inputs */
BOOST_AUTO_TEST_CASE (dcp_test)
{
*/
+#include <boost/test/unit_test.hpp>
+#include "dcp_time.h"
+
/** Check that libdcp::Time works */
BOOST_AUTO_TEST_CASE (dcp_time)
{
*/
+#include <boost/test/unit_test.hpp>
#include "kdm.h"
+#include "dcp.h"
#include "picture_frame.h"
+#include "cpl.h"
#include "argb_frame.h"
+#include "picture_asset.h"
+#include "reel.h"
+#include "test.h"
using boost::dynamic_pointer_cast;
+using boost::shared_ptr;
static shared_ptr<const libdcp::ARGBFrame>
get_frame (libdcp::DCP const & dcp)
*/
+#include <boost/test/unit_test.hpp>
#include "kdm.h"
+#include "KM_util.h"
+#include "metadata.h"
+#include "certificates.h"
+#include "dcp.h"
+#include "signer.h"
+#include "cpl.h"
+#include "picture_asset.h"
+#include "sound_asset.h"
+#include "reel.h"
+#include "test.h"
+
+using boost::shared_ptr;
/* Load a certificate chain from build/test/data/ *.pem and then build
an encrypted DCP and a KDM using it.
*/
+#include <boost/test/unit_test.hpp>
+#include "dcp.h"
+#include "picture_asset.h"
+#include "sound_asset.h"
+#include "util.h"
+#include "exceptions.h"
+
+using std::vector;
+using std::string;
+
/* Check that an exception is thrown when trying to create MXFs from non-existant sources */
BOOST_AUTO_TEST_CASE (error_test)
{
*/
+#include <boost/test/unit_test.hpp>
#include "kdm.h"
#include "xml/kdm_smpte.h"
+using std::list;
+using boost::shared_ptr;
+
BOOST_AUTO_TEST_CASE (kdm_test)
{
libdcp::KDM kdm (
*/
+#include <boost/test/unit_test.hpp>
#include "opendcp_lut.h"
#include "opendcp_lut.cc"
#include "srgb_linearised_gamma_lut.h"
*/
+#include <boost/test/unit_test.hpp>
+#include "dcp.h"
+#include "cpl.h"
+
+using std::list;
+using boost::shared_ptr;
+
/* Read DCP that is in git and make sure that basic stuff is read in correctly */
BOOST_AUTO_TEST_CASE (read_dcp)
{
*/
+#include <boost/test/unit_test.hpp>
+#include <boost/filesystem.hpp>
#include "picture_asset_writer.h"
+#include "picture_asset.h"
+#include "KM_util.h"
+
+using std::string;
+using boost::shared_ptr;
/* Check that recovery from a partially-written MXF works */
BOOST_AUTO_TEST_CASE (recovery)
*/
+#include <boost/test/unit_test.hpp>
+#include "subtitle_asset.h"
+
+using std::list;
+using boost::shared_ptr;
+
/* Load a subtitle asset from XML and check that it is read correctly */
BOOST_AUTO_TEST_CASE (subtitles1)
{
--- /dev/null
+/*
+ Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+
+ 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.
+
+*/
+
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE libdcp_test
+#include <boost/test/unit_test.hpp>
+#include "util.h"
+
+using std::string;
+
+struct TestConfig
+{
+ TestConfig()
+ {
+ libdcp::init ();
+ }
+};
+
+BOOST_GLOBAL_FIXTURE (TestConfig);
+
+string
+j2c (int)
+{
+ return "test/data/32x32_red_square.j2c";
+}
+
+string
+wav (libdcp::Channel)
+{
+ return "test/data/1s_24-bit_48k_silence.wav";
+}
+
+string test_corpus = "../libdcp-test";
+
--- /dev/null
+/*
+ Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+
+ 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.
+
+*/
+
+extern std::string j2c (int);
+extern std::string wav (libdcp::Channel);
+extern std::string test_corpus;
+++ /dev/null
-/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
-
- 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 <cmath>
-#include <boost/filesystem.hpp>
-#include <libxml++/libxml++.h>
-#include "KM_prng.h"
-#include "dcp.h"
-#include "util.h"
-#include "metadata.h"
-#include "types.h"
-#include "exceptions.h"
-#include "subtitle_asset.h"
-#include "picture_asset.h"
-#include "sound_asset.h"
-#include "reel.h"
-#include "certificates.h"
-#include "signer_chain.h"
-#include "gamma_lut.h"
-#include "cpl.h"
-#include "signer.h"
-
-#define BOOST_TEST_DYN_LINK
-#define BOOST_TEST_MODULE libdcp_test
-#include <boost/test/unit_test.hpp>
-
-using std::string;
-using std::cout;
-using std::vector;
-using std::list;
-using boost::shared_ptr;
-
-struct TestConfig
-{
- TestConfig()
- {
- libdcp::init ();
- }
-};
-
-BOOST_GLOBAL_FIXTURE (TestConfig);
-
-static string
-j2c (int)
-{
- return "test/data/32x32_red_square.j2c";
-}
-
-static string
-wav (libdcp::Channel)
-{
- return "test/data/1s_24-bit_48k_silence.wav";
-}
-
-static string test_corpus = "../libdcp-test";
-
-#include "utc_offset_to_string_test.cc"
-#include "lut_test.cc"
-#include "util_test.cc"
-#include "decryption_test.cc"
-#include "kdm_test.cc"
-#include "dcp_test.cc"
-#include "error_test.cc"
-#include "read_dcp_test.cc"
-#include "subtitle_tests.cc"
-#include "dcp_time_test.cc"
-#include "color_test.cc"
-#include "recovery_test.cc"
-#include "certificates_test.cc"
-
-BOOST_AUTO_TEST_CASE (signer_chain)
-{
- boost::filesystem::remove_all ("build/test/signer");
- boost::filesystem::create_directory ("build/test/signer");
- libdcp::make_signer_chain ("build/test/signer");
-}
-
-#include "encryption_test.cc"
*/
+#include <boost/test/unit_test.hpp>
#include "metadata.h"
+#include "util.h"
-/** Test XMLMetadata::utc_offset_to_string */
+/** Test libdcp::utc_offset_to_string */
BOOST_AUTO_TEST_CASE (utc_offset_to_string_test)
{
BOOST_CHECK_EQUAL (libdcp::utc_offset_to_string (30), "+00:30");
*/
#include <fstream>
+#include <boost/test/unit_test.hpp>
+#include "util.h"
using std::ifstream;
+using std::string;
BOOST_AUTO_TEST_CASE (bsae64_decode_test)
{
obj.name = 'tests'
obj.uselib = 'BOOST_TEST OPENJPEG CXML XMLSEC1'
obj.use = 'libdcp'
- obj.source = 'tests.cc'
+ obj.source = """
+ test.cc
+ certificates_test.cc
+ dcp_test.cc
+ encryption_test.cc
+ lut_test.cc
+ read_dcp_test.cc
+ color_test.cc
+ dcp_time_test.cc
+ error_test.cc
+ recovery_test.cc
+ utc_offset_to_string_test.cc
+ decryption_test.cc
+ kdm_test.cc
+ subtitle_tests.cc
+ util_test.cc
+ """
obj.target = 'tests'
obj.install_path = ''