From f6fb2090f4180f8cd507d694f7eb663b3f25d2f0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 29 May 2014 14:20:17 +0100 Subject: Separate out STL binary tables so that writer can use them; start of writer. --- test/stl_binary_writer_test.cc | 52 ++++++++++++++++++++++++++++++++++++++++++ test/wscript | 1 + 2 files changed, 53 insertions(+) create mode 100644 test/stl_binary_writer_test.cc (limited to 'test') 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 + + 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 + +using std::list; + +/** Test writing of a binary STL file */ +BOOST_AUTO_TEST_CASE (stl_binary_writer_test) +{ + list 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 -- cgit v1.2.3