diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-06 21:55:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-06 21:55:28 +0100 |
| commit | 9210a6426370b9809b6d7546ac38f4a8ce1427ac (patch) | |
| tree | 987aeddfe949762755001ed6c553afd3b2daa918 | |
| parent | c23fb4a459e445df91f5b8ea8ceaed48bb5c277f (diff) | |
More tests.
| -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 + ); +} |
