Move some methods higher up the file.
authorCarl Hetherington <cth@carlh.net>
Sun, 14 Apr 2024 14:08:45 +0000 (16:08 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 14 Apr 2024 15:22:08 +0000 (17:22 +0200)
test/verify_test.cc

index 580afe26a7553bf996c1308f58320ce08effb268..9718bbbde45f4beba9b0c0b81f94932dbda83ff9 100644 (file)
@@ -361,6 +361,38 @@ add(vector<dcp::VerificationNote>& notes, vector<dcp::VerificationNote> const& a
 }
 
 
+path
+find_prefix(path dir, string prefix)
+{
+       auto iter = std::find_if(directory_iterator(dir), directory_iterator(), [prefix](path const& p) {
+               return boost::starts_with(p.filename().string(), prefix);
+       });
+
+       BOOST_REQUIRE(iter != directory_iterator());
+       return iter->path();
+}
+
+
+path find_cpl (path dir)
+{
+       return find_prefix(dir, "cpl_");
+}
+
+
+path
+find_pkl(path dir)
+{
+       return find_prefix(dir, "pkl_");
+}
+
+
+path
+find_asset_map(path dir)
+{
+       return find_prefix(dir, "ASSETMAP");
+}
+
+
 BOOST_AUTO_TEST_CASE (verify_no_error)
 {
        stages.clear ();
@@ -1196,38 +1228,6 @@ BOOST_AUTO_TEST_CASE (verify_valid_cpl_metadata)
 }
 
 
-path
-find_prefix(path dir, string prefix)
-{
-       auto iter = std::find_if(directory_iterator(dir), directory_iterator(), [prefix](path const& p) {
-               return boost::starts_with(p.filename().string(), prefix);
-       });
-
-       BOOST_REQUIRE(iter != directory_iterator());
-       return iter->path();
-}
-
-
-path find_cpl (path dir)
-{
-       return find_prefix(dir, "cpl_");
-}
-
-
-path
-find_pkl(path dir)
-{
-       return find_prefix(dir, "pkl_");
-}
-
-
-path
-find_asset_map(path dir)
-{
-       return find_prefix(dir, "ASSETMAP");
-}
-
-
 /* DCP with invalid CompositionMetadataAsset */
 BOOST_AUTO_TEST_CASE (verify_invalid_cpl_metadata_bad_tag)
 {