Move Editor class to test.{cc,h}
[dcpomatic.git] / test / subtitle_font_id_change_test.cc
index f325419800b67233a5e92eb43a7abf6edda3d1ee..878dc650668bd30d152aaea709fcb1b1f873b477 100644 (file)
 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");