diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-18 01:44:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-18 01:44:40 +0100 |
| commit | 8650a58952f33bda2856ec089cd0f4590989178a (patch) | |
| tree | a8bf1f9ee7afa94b7f0210921afe5a74ef7e2011 /test/tests.cc | |
| parent | a0d24fa76222579c2fc34ea8f9923ac018163f51 (diff) | |
Test exception on adding a non-existant image file.
Diffstat (limited to 'test/tests.cc')
| -rw-r--r-- | test/tests.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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<string> p; + p.push_back ("frobozz"); + BOOST_CHECK_THROW (d.add_picture_asset (p, 32, 32), libdcp::FileError); +} |
