#include <golden_digest_manager.h>
Public Member Functions | |
| GoldenDigestManager (const std::string &working_directory) | |
| ~GoldenDigestManager () | |
| const std::string & | GetWorkingDirectory () const |
| std::string | GetFullPath (const std::string &filename) const |
| void | AddDimension (const std::string &name, const std::string &value) |
| void | AddImage (const std::string &test_name, const std::string &golden_filename, int32_t width, int32_t height) |
| bool | Write () |
| void | ClearDigestData () |
Manages a global variable for tracking a directory containing instances of golden images.
Definition at line 17 of file golden_digest_manager.h.
|
explicit |
Constructs a GoldenDigest that will accumulate golden image filenames and Dimension key/value pairs for the specified working directory and write them to a file named "digest.json" in that directory when |Write| is called.
Definition at line 19 of file golden_digest_manager.cc.
| impeller::testing::GoldenDigestManager::~GoldenDigestManager | ( | ) |
Definition at line 23 of file golden_digest_manager.cc.
References FML_LOG.
| void impeller::testing::GoldenDigestManager::AddDimension | ( | const std::string & | name, |
| const std::string & | value | ||
| ) |
Definition at line 47 of file golden_digest_manager.cc.
References flutter::name, and value.
| void impeller::testing::GoldenDigestManager::AddImage | ( | const std::string & | test_name, |
| const std::string & | golden_filename, | ||
| int32_t | width, | ||
| int32_t | height | ||
| ) |
Definition at line 54 of file golden_digest_manager.cc.
References height, kMaxColorDelta, kMaxDiffPixelsPercent, and width.
| void impeller::testing::GoldenDigestManager::ClearDigestData | ( | ) |
Clears all accumulated dimension and golden image data if the digest should not be written.
(Failing to call either this method or the |Write| method causes a warning to be written to the console about unwritten data left in the digest manater.)
Definition at line 123 of file golden_digest_manager.cc.
| std::string impeller::testing::GoldenDigestManager::GetFullPath | ( | const std::string & | filename | ) | const |
Definition at line 42 of file golden_digest_manager.cc.
References fml::paths::JoinPaths().
Referenced by Write().
| const std::string & impeller::testing::GoldenDigestManager::GetWorkingDirectory | ( | ) | const |
Definition at line 38 of file golden_digest_manager.cc.
| bool impeller::testing::GoldenDigestManager::Write | ( | ) |
Writes a "digest.json" file to the working directory.
(Failing to call either this method or the |ClearDigestData| method causes a warning to be written to the console about unwritten data left in the digest manater.)
Returns true on success.
Definition at line 62 of file golden_digest_manager.cc.
References GetFullPath().