diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-18 00:23:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-18 00:23:28 +0100 |
| commit | ca45f479876579c91b9d438c47c5166b1a178704 (patch) | |
| tree | 2757a90d01307b66a39ecbca5544c47ffdf324fc /test | |
| parent | 2194158985f9c1300ffe24c7c6fb786cb39bbdb5 (diff) | |
Allow functor to obtain content paths.
Diffstat (limited to 'test')
| -rw-r--r-- | test/tests.cc | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/test/tests.cc b/test/tests.cc index 7d60f70e..f4e5b441 100644 --- a/test/tests.cc +++ b/test/tests.cc @@ -22,6 +22,7 @@ #include "dcp.h" #include "util.h" #include "metadata.h" +#include "types.h" #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE libdcp_test @@ -30,6 +31,19 @@ using namespace std; using namespace boost; +string +j2c (int) +{ + return "test/data/32x32_red_square.j2c"; +} + +string +wav (libdcp::Channel) +{ + return "test/data/1s_24-bit_48k_silence.wav"; +} + + BOOST_AUTO_TEST_CASE (dcp_test) { Kumu::libdcp_test = true; @@ -45,17 +59,8 @@ BOOST_AUTO_TEST_CASE (dcp_test) filesystem::create_directories ("build/test/foo"); libdcp::DCP d ("build/test/foo", "A Test DCP", libdcp::DCP::FEATURE, 24, 24); - list<string> j2cs; - for (int i = 0; i < 24; ++i) { - j2cs.push_back ("test/data/32x32_red_square.j2c"); - } - d.add_picture_asset (j2cs, 32, 32); - - list<string> wavs; - for (int i = 0; i < 2; ++i) { - wavs.push_back ("test/data/1s_24-bit_48k_silence.wav"); - } - d.add_sound_asset (wavs); + d.add_picture_asset (sigc::ptr_fun (&j2c), 32, 32); + d.add_sound_asset (sigc::ptr_fun (&wav), 2); d.write_xml (); } |
