summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-10-06 11:59:55 +0100
committerCarl Hetherington <cth@carlh.net>2014-10-06 11:59:55 +0100
commit082eb865bbae0ea4350b7dffbf43f1c21b6b4c82 (patch)
treea9302f49fe9db3ea5ff5065e3a5e5a9781903304 /src
parentae10bb2a702ab08c497b940d43f0d6e85ae26970 (diff)
Copy another test over from DCP-o-matic.
Diffstat (limited to 'src')
-rw-r--r--src/reader.h4
-rw-r--r--src/subrip_reader.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/reader.h b/src/reader.h
index 989ad58..235fa81 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -25,6 +25,8 @@
#include <map>
#include <string>
+struct subrip_reader_convert_line_test;
+
namespace sub {
/** @class Reader
@@ -42,6 +44,8 @@ public:
}
protected:
+ friend struct ::subrip_reader_convert_line_test;
+
void warn (std::string) const;
std::list<RawSubtitle> _subs;
diff --git a/src/subrip_reader.h b/src/subrip_reader.h
index 2c69971..8824347 100644
--- a/src/subrip_reader.h
+++ b/src/subrip_reader.h
@@ -28,6 +28,10 @@ public:
SubripReader (FILE* f);
private:
+ /* For tests */
+ friend struct ::subrip_reader_convert_line_test;
+ SubripReader () {}
+
TimePair convert_time (std::string t);
void convert_line (std::string t, int line_number, TimePair from, TimePair to);
void maybe_content (RawSubtitle& p);