Move some tests and rename one set.
[libdcp.git] / test / interop_load_font_test.cc
index b5972762b74cb058dba2171467c5fbfbe448fd36..0a5a0f6c5af3fb5c374b6561e0125d034df8a699 100644 (file)
@@ -1,34 +1,50 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net>
 
-    This program is free software; you can redistribute it and/or modify
+    This file is part of libdcp.
+
+    libdcp 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,
+    libdcp 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.
+    along with libdcp.  If not, see <http://www.gnu.org/licenses/>.
+
+    In addition, as a special exception, the copyright holders give
+    permission to link the code of portions of this program with the
+    OpenSSL library under certain conditions as described in each
+    individual source file, and distribute linked combinations
+    including the two.
 
+    You must obey the GNU General Public License in all respects
+    for all of the code used other than OpenSSL.  If you modify
+    file(s) with this exception, you may extend this exception to your
+    version of the file(s), but you are not obligated to do so.  If you
+    do not wish to do so, delete this exception statement from your
+    version.  If you delete this exception statement from all source
+    files in the program, then also delete it here.
 */
 
-#include "interop_load_font.h"
+#include "interop_load_font_node.h"
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
 #include <boost/test/unit_test.hpp>
 
+/** Test dcp::InteropLoadFont's simple constructor */
 BOOST_AUTO_TEST_CASE (interop_load_font_test1)
 {
-       dcp::InteropLoadFont lf ("my-great-id", "my-great-uri");
+       dcp::InteropLoadFontNode lf ("my-great-id", "my-great-uri");
        BOOST_CHECK_EQUAL (lf.id, "my-great-id");
        BOOST_CHECK_EQUAL (lf.uri, "my-great-uri");
 }
 
+/** Test dcp::InteropLoadFont's XML constructor */
 BOOST_AUTO_TEST_CASE (interop_load_font_test2)
 {
        xmlpp::Document doc;
@@ -36,7 +52,7 @@ BOOST_AUTO_TEST_CASE (interop_load_font_test2)
 
        text->set_attribute("Id", "my-great-id");
        text->set_attribute("URI", "my-great-uri");
-       dcp::InteropLoadFont lf (cxml::ConstNodePtr (new cxml::Node (text)));
+       dcp::InteropLoadFontNode lf (cxml::ConstNodePtr (new cxml::Node (text)));
 
        BOOST_CHECK_EQUAL (lf.id, "my-great-id");
 }
@@ -49,7 +65,7 @@ BOOST_AUTO_TEST_CASE (interop_load_font_test3)
 
        text->set_attribute("ID", "my-great-id");
        text->set_attribute("URI", "my-great-uri");
-       dcp::InteropLoadFont lf (cxml::ConstNodePtr (new cxml::Node (text)));
+       dcp::InteropLoadFontNode lf (cxml::ConstNodePtr (new cxml::Node (text)));
 
        BOOST_CHECK_EQUAL (lf.id, "my-great-id");
 }
@@ -57,9 +73,9 @@ BOOST_AUTO_TEST_CASE (interop_load_font_test3)
 /** Test operator== and operator!= */
 BOOST_AUTO_TEST_CASE (interop_load_font_test4)
 {
-       dcp::InteropLoadFont A ("my-create-id", "my-great-uri");
-       dcp::InteropLoadFont B ("my-create-id", "my-great-uri");
-       dcp::InteropLoadFont C ("my-create-id", "another-great-uri");
+       dcp::InteropLoadFontNode A ("my-create-id", "my-great-uri");
+       dcp::InteropLoadFontNode B ("my-create-id", "my-great-uri");
+       dcp::InteropLoadFontNode C ("my-create-id", "another-great-uri");
 
        BOOST_CHECK (A == B);
        BOOST_CHECK (B != C);