From: Carl Hetherington Date: Wed, 18 Jul 2012 00:44:40 +0000 (+0100) Subject: Test exception on adding a non-existant image file. X-Git-Tag: v0.02~7 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=8650a58952f33bda2856ec089cd0f4590989178a;p=libdcp.git Test exception on adding a non-existant image file. --- diff --git a/test/tests.cc b/test/tests.cc index f4e5b441..20bc19f0 100644 --- a/test/tests.cc +++ b/test/tests.cc @@ -23,6 +23,7 @@ #include "util.h" #include "metadata.h" #include "types.h" +#include "exceptions.h" #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE libdcp_test @@ -64,3 +65,11 @@ BOOST_AUTO_TEST_CASE (dcp_test) d.write_xml (); } + +BOOST_AUTO_TEST_CASE (error_test) +{ + libdcp::DCP d ("build/test/bar", "A Test DCP", libdcp::DCP::TEST, 24, 24); + vector p; + p.push_back ("frobozz"); + BOOST_CHECK_THROW (d.add_picture_asset (p, 32, 32), libdcp::FileError); +}