summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-20 19:30:04 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-20 20:05:26 +0100
commit572f030509c2b0c1f662a54624ab0be6efdd9024 (patch)
treef34f14aa40f8ce0854f104fbabccd4f756bafd3d /test
parente9ca66f0d8897739cdef22f5011e0866f5a3f741 (diff)
Try to clean up stream handling wrt audio channel counts.
Diffstat (limited to 'test')
-rw-r--r--test/metadata.ref2
-rw-r--r--test/test.cc13
2 files changed, 13 insertions, 2 deletions
diff --git a/test/metadata.ref b/test/metadata.ref
index 67053bd58..652867ce0 100644
--- a/test/metadata.ref
+++ b/test/metadata.ref
@@ -31,9 +31,7 @@ package_type
width 0
height 0
length 0
-audio_channels 0
audio_sample_rate 0
-audio_sample_format Unknown
content_digest
has_subtitles 0
frames_per_second 0
diff --git a/test/test.cc b/test/test.cc
index 7ca6d0cd3..468e6c1fd 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -501,3 +501,16 @@ BOOST_AUTO_TEST_CASE (job_manager_test)
BOOST_CHECK_EQUAL (a->finished_in_error(), true);
BOOST_CHECK_EQUAL (b->running(), false);
}
+
+BOOST_AUTO_TEST_CASE (stream_test)
+{
+ AudioStream a ("4 9 hello there world");
+ BOOST_CHECK_EQUAL (a.id(), 4);
+ BOOST_CHECK_EQUAL (a.channels(), 9);
+ BOOST_CHECK_EQUAL (a.name(), "hello there world");
+ BOOST_CHECK_EQUAL (a.to_string(), "4 9 hello there world");
+
+ SubtitleStream s ("5 a b c");
+ BOOST_CHECK_EQUAL (s.id(), 5);
+ BOOST_CHECK_EQUAL (s.name(), "a b c");
+}