diff options
author | Boyuan Yang <byang@debian.org> | 2021-11-07 08:50:20 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2021-11-07 08:50:20 -0500 |
commit | 513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44 (patch) | |
tree | 249280ac94eb2b871de89cd1b166fff4ee00ab09 /tests/utils.h | |
parent | 3c21ceac2f6a5adfab07d3d458880561543d0a31 (diff) | |
parent | 320ef65362608ee1148c299d8d5d7618af34e470 (diff) | |
download | libgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.tar.gz libgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.tar.bz2 libgav1-513fcf1cd0dca1a6cbef9ff6e38e22237e75ba44.zip |
Update upstream source from tag 'upstream/0.17.0'
Update to upstream version '0.17.0'
with Debian dir 5b612b6a2d67788b0c85bac59e50edc1545bfd7e
Diffstat (limited to 'tests/utils.h')
-rw-r--r-- | tests/utils.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/utils.h b/tests/utils.h index b3062da..4d73070 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -22,6 +22,7 @@ #include <string> #include "absl/base/config.h" +#include "absl/strings/string_view.h" #include "absl/time/time.h" #include "src/gav1/decoder_buffer.h" #include "src/utils/memory.h" @@ -132,6 +133,24 @@ void CheckMd5Digest(const char name[], const char function_name[], const char expected_digest[], const char actual_digest[], absl::Duration elapsed_time); +//------------------------------------------------------------------------------ +// Reads the test data from |file_name| as a string into |output|. The +// |is_output_file| argument controls the expansion of |file_name| to its full +// path. When |is_output_file| is true GetTestData() reads from +// utils.cc::GetTempDir(), and when it is false the file is read from +// utils.cc::GetSourceDir(). +void GetTestData(absl::string_view file_name, bool is_output_file, + std::string* output); + +//------------------------------------------------------------------------------ +// Returns the full path to |file_name| from libgav1/tests/data. +std::string GetTestInputFilePath(absl::string_view file_name); + +//------------------------------------------------------------------------------ +// Returns the full path to |file_name| in a location where the file can be +// opened for writing. +std::string GetTestOutputFilePath(absl::string_view file_name); + } // namespace test_utils } // namespace libgav1 |