From 9210a6426370b9809b6d7546ac38f4a8ce1427ac Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 6 Jul 2015 21:55:28 +0100 Subject: More tests. --- test/sound_frame_test.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 #include "test.h" #include "sound_frame.h" +#include "exceptions.h" #include 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 + ); +} -- cgit v1.2.3