X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Faudio_mapping_test.cc;h=14c6d031d8a7a306a8654e71849534a09dd0237e;hb=2a01820de9229fd778787421ec4f7bbf1e4b8bf1;hp=1fc20dcaf6e0433dcfcaebdcf3afc4a0ddcc955c;hpb=b666a794a130386bc01ede2143ef40bd6973eb32;p=dcpomatic.git diff --git a/test/audio_mapping_test.cc b/test/audio_mapping_test.cc index 1fc20dcaf..14c6d031d 100644 --- a/test/audio_mapping_test.cc +++ b/test/audio_mapping_test.cc @@ -17,28 +17,22 @@ */ +/** @file test/audio_mapping_test.cc + * @brief Basic tests of the AudioMapping class, which itself doesn't really do much. + */ + #include #include "lib/audio_mapping.h" #include "lib/util.h" -/* Basic tests of the AudioMapping class, which itself - doesn't really do much. -*/ BOOST_AUTO_TEST_CASE (audio_mapping_test) { AudioMapping none; - BOOST_CHECK_EQUAL (none.content_channels(), 0); - - AudioMapping four (4); - BOOST_CHECK_EQUAL (four.content_channels(), 4); - four.make_default (); + BOOST_CHECK_EQUAL (none.input_channels(), 0); - for (int i = 0; i < 4; ++i) { - for (int j = 0; j < MAX_AUDIO_CHANNELS; ++j) { - BOOST_CHECK_EQUAL (four.get (i, static_cast (j)), i == j ? 1 : 0); - } - } + AudioMapping four (4, MAX_DCP_AUDIO_CHANNELS); + BOOST_CHECK_EQUAL (four.input_channels(), 4); - four.set (0, dcp::RIGHT, 1); - BOOST_CHECK_EQUAL (four.get (0, dcp::RIGHT), 1); + four.set (0, 1, 1); + BOOST_CHECK_EQUAL (four.get (0, 1), 1); }