Flutter Engine
txt_run_all_unittests.cc File Reference
#include <cassert>
#include "flutter/fml/backtrace.h"
#include "flutter/fml/command_line.h"
#include "flutter/fml/icu_util.h"
#include "flutter/fml/logging.h"
#include "flutter/testing/testing.h"
#include "third_party/skia/include/core/SkGraphics.h"
#include "txt_test_utils.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 27 of file txt_run_all_unittests.cc.

References fml::CommandLineFromArgcArgv(), FML_DCHECK, FML_LOG, flutter::testing::GetFixturesPath(), txt::GetFontDir(), fml::icu::InitializeICU(), fml::InstallCrashHandler(), length, txt::SetCommandLine(), and txt::SetFontDir().

27  {
32  if (txt::GetFontDir().length() <= 0) {
33  FML_LOG(ERROR) << "Font directory not set via txt::SetFontDir.";
34  return EXIT_FAILURE;
35  }
37 #if defined(OS_FUCHSIA)
38  fml::icu::InitializeICU("/pkg/data/icudtl.dat");
39 #else
40  fml::icu::InitializeICU("icudtl.dat");
41 #endif
42  SkGraphics::Init();
43  testing::InitGoogleTest(&argc, argv);
44  return RUN_ALL_TESTS();
45 }
void InstallCrashHandler()
Definition: backtrace.cc:133
#define FML_DCHECK(condition)
Definition: logging.h:86
CommandLine CommandLineFromArgcArgv(int argc, const char *const *argv)
Definition: command_line.h:222
void InitializeICU(const std::string &icu_data_path)
Definition: icu_util.cc:103
#define FML_LOG(severity)
Definition: logging.h:65
void SetFontDir(const std::string &dir)
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
size_t length
const std::string & GetFontDir()
void SetCommandLine(fml::CommandLine cmd)