summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/stl_binary_writer_test.cc52
-rw-r--r--test/wscript1
2 files changed, 53 insertions, 0 deletions
diff --git a/test/stl_binary_writer_test.cc b/test/stl_binary_writer_test.cc
new file mode 100644
index 0000000..3960ea2
--- /dev/null
+++ b/test/stl_binary_writer_test.cc
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "stl_binary_writer.h"
+#include "subtitle.h"
+#include <boost/test/unit_test.hpp>
+
+using std::list;
+
+/** Test writing of a binary STL file */
+BOOST_AUTO_TEST_CASE (stl_binary_writer_test)
+{
+ list<sub::Subtitle> subs;
+
+ sub::write_stl_binary (
+ subs,
+ 25,
+ sub::LANGUAGE_GERMAN,
+ "Original programme title",
+ "Original episode title",
+ "TX program title",
+ "TX episode title",
+ "TX name",
+ "TX contact",
+ "140212",
+ "140213",
+ 0,
+ "GBR",
+ "Publisher",
+ "Editor name",
+ "Editor contact",
+ "build/test/test.stl"
+ );
+
+}
+
diff --git a/test/wscript b/test/wscript
index d9ea727..cbc3dd1 100644
--- a/test/wscript
+++ b/test/wscript
@@ -19,6 +19,7 @@ def build(bld):
dcp_reader_test.cc
iso6937_test.cc
stl_binary_reader_test.cc
+ stl_binary_writer_test.cc
stl_text_reader_test.cc
time_test.cc
test.cc