Flutter Engine
The Flutter Engine
TestRunner.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef TestRunner_DEFINED
9#define TestRunner_DEFINED
10
12
13#include <map>
14
15namespace TestRunner {
16namespace FlagValidators {
17
19
21
23
24void IntGreaterOrEqual(std::string name, int flag, int min);
25
26void AllOrNone(std::map<std::string, bool> flags);
27
28void ExactlyOne(std::map<std::string, bool> flags);
29
30} // namespace FlagValidators
31
32// Performs some common initialization steps, and logs all command-line arguments.
33//
34// It should be called by all test runners at the beginning of their main() function.
35void InitAndLogCmdlineArgs(int argc, char** argv);
36
37// Determines whether a test case should be run based on the --match and --skip command-line flags.
38bool ShouldRunTestCase(const char* name,
41
42// Logs a message to stdout.
43//
44// It prefixes the message with a timestamp, and suffixes it with a line break ("\n").
45void Log(const char* format, ...) SK_PRINTF_LIKE(1, 2);
46
47} // namespace TestRunner
48
49#endif // TestRunner_DEFINED
#define SK_PRINTF_LIKE(A, B)
Definition: SkAttributes.h:52
FlutterSemanticsFlag flag
FlutterSemanticsFlag flags
uint32_t uint32_t * format
static float min(float r, float g, float b)
Definition: hsl.cpp:48
char ** argv
Definition: library.h:9
void StringEven(std::string name, CommandLineFlags::StringArray flag)
Definition: TestRunner.cpp:31
void IntGreaterOrEqual(std::string name, int flag, int min)
Definition: TestRunner.cpp:38
void ExactlyOne(std::map< std::string, bool > flags)
Definition: TestRunner.cpp:62
void AllOrNone(std::map< std::string, bool > flags)
Definition: TestRunner.cpp:44
void StringNonEmpty(std::string name, CommandLineFlags::StringArray flag)
Definition: TestRunner.cpp:17
void StringAtMostOne(std::string name, CommandLineFlags::StringArray flag)
Definition: TestRunner.cpp:24
bool ShouldRunTestCase(const char *name, CommandLineFlags::StringArray &matchFlag, CommandLineFlags::StringArray &skipFlag)
Definition: TestRunner.cpp:113
void Log(const char *format,...) SK_PRINTF_LIKE(1
Definition: TestRunner.cpp:137
void InitAndLogCmdlineArgs(int argc, char **argv)
Definition: TestRunner.cpp:88
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32