diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-27 01:27:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-06 23:05:15 +0100 |
| commit | 73780cdb80eb3ac1f0f9d96fe6032f8a2317b01b (patch) | |
| tree | 171b53d146b9eb5a0e98e90b5dbdbff6cf3a7a50 /test/test.cc | |
| parent | eac3cac07eb97a6bcf6accd1575af76cd6f59112 (diff) | |
WIP: analyse J2K files.j2k-check
Diffstat (limited to 'test/test.cc')
| -rw-r--r-- | test/test.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test.cc b/test/test.cc index 7ee42cf8..1f12bee4 100644 --- a/test/test.cc +++ b/test/test.cc @@ -515,4 +515,19 @@ black_picture_asset (boost::filesystem::path dir, int frames) } +boost::filesystem::path +find_file (boost::filesystem::path dir, string filename_part) +{ + boost::optional<boost::filesystem::path> found; + for (auto i: boost::filesystem::directory_iterator(dir)) { + if (i.path().filename().string().find(filename_part) != string::npos) { + BOOST_REQUIRE (!found); + found = i; + } + } + BOOST_REQUIRE (found); + return *found; +} + + BOOST_GLOBAL_FIXTURE (TestConfig); |
