diff options
| -rw-r--r-- | test/sound_frame_test.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/sound_frame_test.cc b/test/sound_frame_test.cc index 6ded1977..cd96b4a9 100644 --- a/test/sound_frame_test.cc +++ b/test/sound_frame_test.cc @@ -20,6 +20,7 @@ #include <boost/test/unit_test.hpp> #include "test.h" #include "sound_frame.h" +#include "exceptions.h" #include <sndfile.h> BOOST_AUTO_TEST_CASE (sound_frame_test) @@ -33,6 +34,8 @@ BOOST_AUTO_TEST_CASE (sound_frame_test) 0 ); + BOOST_REQUIRE_EQUAL (frame.size(), channels * frame_length * 3); + boost::filesystem::path ref_file = private_test / "frame.wav"; SF_INFO info; info.format = 0; @@ -53,3 +56,14 @@ BOOST_AUTO_TEST_CASE (sound_frame_test) p += 3; } } + +BOOST_AUTO_TEST_CASE (sound_frame_test2) +{ + BOOST_CHECK_THROW (dcp::SoundFrame ("frobozz", 42, 0), dcp::FileError); + BOOST_CHECK_THROW (dcp::SoundFrame ( + private_test / + "TONEPLATES-SMPTE-PLAINTEXT_TST_F_XX-XX_ITL-TD_51-XX_2K_WOE_20111001_WOE_OV/pcm_95734608-5d47-4d3f-bf5f-9e9186b66afa_.mxf", + 999999999, 0 + ), dcp::DCPReadError + ); +} |
