7#include "flutter/fml/backtrace.h"
8#include "flutter/fml/build_config.h"
9#include "flutter/fml/command_line.h"
10#include "flutter/fml/logging.h"
11#include "flutter/impeller/base/validation.h"
12#include "flutter/impeller/golden_tests/golden_digest.h"
13#include "flutter/impeller/golden_tests/working_directory.h"
14#include "gtest/gtest.h"
18 std::cout <<
"usage: impeller_golden_tests --working_dir=<working_dir>"
21 std::cout <<
"flags:" << std::endl;
22 std::cout <<
" working_dir: Where the golden images will be generated and "
23 "uploaded to Skia Gold from."
29TEST(ValidationTest, IsFatal) {
34int main(
int argc,
char** argv) {
37 testing::InitGoogleTest(&argc,
argv);
40 std::optional<std::string> working_dir;
41 for (
const auto& option : cmd.options()) {
42 if (option.name ==
"working_dir") {
43 wordexp_t wordexp_result;
44 int code = wordexp(option.value.c_str(), &wordexp_result, 0);
47 working_dir = wordexp_result.we_wordv[0];
48 wordfree(&wordexp_result);
52 std::cout <<
"required argument \"working_dir\" is missing." << std::endl
59 std::cout <<
"working directory: "
63 int return_code = RUN_ALL_TESTS();
64 if (0 == return_code) {
#define TEST(S, s, D, expected)
bool Write(WorkingDirectory *working_directory)
static GoldenDigest * Instance()
void SetPath(const std::string &path)
const std::string & GetPath() const
static WorkingDirectory * Instance()
#define FML_CHECK(condition)
void InstallCrashHandler()
CommandLine CommandLineFromPlatformOrArgcArgv(int argc, const char *const *argv)
bool ImpellerValidationErrorsAreFatal()
void ImpellerValidationErrorsSetFatal(bool fatal)
#define EXPECT_TRUE(handle)