diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-09-26 01:02:17 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-09-26 01:02:17 +0200 |
| commit | dea555a6d395e74c20436123a5f3b5bd623ebcf6 (patch) | |
| tree | 4dd96f24249d8647adb9440f03704c4290a62541 /test/subtitle_font_id_change_test.cc | |
| parent | 3cd0685fb3f3222b3e9a2406986274031befeae6 (diff) | |
Move Editor class to test.{cc,h}
Diffstat (limited to 'test/subtitle_font_id_change_test.cc')
| -rw-r--r-- | test/subtitle_font_id_change_test.cc | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/test/subtitle_font_id_change_test.cc b/test/subtitle_font_id_change_test.cc index f32541980..878dc6506 100644 --- a/test/subtitle_font_id_change_test.cc +++ b/test/subtitle_font_id_change_test.cc @@ -38,37 +38,6 @@ using std::string; -class Editor -{ -public: - Editor (boost::filesystem::path path) - : _path(path) - , _content(dcp::file_to_string(path)) - { - - } - - ~Editor () - { - auto f = fopen(_path.string().c_str(), "w"); - BOOST_REQUIRE(f); - fwrite(_content.c_str(), _content.length(), 1, f); - fclose(f); - } - - void replace (string a, string b) - { - auto old_content = _content; - boost::algorithm::replace_all (_content, a, b); - BOOST_REQUIRE (_content != old_content); - } - -private: - boost::filesystem::path _path; - std::string _content; -}; - - BOOST_AUTO_TEST_CASE(subtitle_font_id_change_test1) { auto film = new_test_film2("subtitle_font_id_change_test1"); |
