Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Enumerations | Functions | Variables
gtest.cc File Reference
#include "gtest/gtest.h"
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>
#include <algorithm>
#include <chrono>
#include <cmath>
#include <csignal>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <initializer_list>
#include <iomanip>
#include <ios>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <ostream>
#include <set>
#include <sstream>
#include <unordered_set>
#include <utility>
#include <vector>
#include "gtest/gtest-assertion-result.h"
#include "gtest/gtest-spi.h"
#include "gtest/internal/custom/gtest.h"
#include "gtest/internal/gtest-port.h"
#include <sys/time.h>
#include <unistd.h>
#include "src/gtest-internal-inl.h"
Include dependency graph for gtest.cc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  testing::internal::Timer
 
class  testing::internal::PrettyUnitTestResultPrinter
 
class  testing::internal::BriefUnitTestResultPrinter
 
class  testing::internal::TestEventRepeater
 

Namespaces

 testing
 
 testing::internal
 
 testing::internal::edit_distance
 

Macros

#define GTEST_HAS_BUILTIN(x)   0
 
#define GTEST_REPEATER_METHOD_(Name, Type)
 
#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type)
 
#define GTEST_INTERNAL_PARSE_FLAG(flag_name)
 

Enumerations

enum  GTestColor { testing::internal::@329::GTestColor::kDefault, testing::internal::@329::GTestColor::kRed, testing::internal::@329::GTestColor::kGreen, testing::internal::@329::GTestColor::kYellow }
 

Functions

static const char * testing::GetDefaultFilter ()
 
static bool testing::GetDefaultFailFast ()
 
 GTEST_DEFINE_bool_ (fail_fast, testing::internal::BoolFromGTestEnv("fail_fast", testing::GetDefaultFailFast()),"True if and only if a test failure should stop further test execution.")
 
 GTEST_DEFINE_bool_ (also_run_disabled_tests, testing::internal::BoolFromGTestEnv("also_run_disabled_tests", false),"Run disabled tests too, in addition to the tests normally being run.")
 
 GTEST_DEFINE_bool_ (break_on_failure, testing::internal::BoolFromGTestEnv("break_on_failure", false),"True if and only if a failed assertion should be a debugger ""break-point.")
 
 GTEST_DEFINE_bool_ (catch_exceptions, testing::internal::BoolFromGTestEnv("catch_exceptions", true),"True if and only if "GTEST_NAME_" should catch exceptions and treat them as test failures.")
 
 GTEST_DEFINE_string_ (color, testing::internal::StringFromGTestEnv("color","auto"),"Whether to use colors in the output. Valid values: yes, no, ""and auto. 'auto' means to use colors if the output is ""being sent to a terminal and the TERM environment variable ""is set to a terminal type that supports colors.")
 
 GTEST_DEFINE_string_ (filter, testing::internal::StringFromGTestEnv("filter", testing::GetDefaultFilter()),"A colon-separated list of glob (not regex) patterns ""for filtering the tests to run, optionally followed by a ""'-' and a : separated list of negative patterns (tests to ""exclude). A test is run if it matches one of the positive ""patterns and does not match any of the negative patterns.")
 
 GTEST_DEFINE_bool_ (install_failure_signal_handler, testing::internal::BoolFromGTestEnv("install_failure_signal_handler", false),"If true and supported on the current platform, "GTEST_NAME_" should ""install a signal handler that dumps debugging information when fatal ""signals are raised.")
 
 GTEST_DEFINE_bool_ (list_tests, false,"List all tests without running them.")
 
 GTEST_DEFINE_string_ (output, testing::internal::StringFromGTestEnv("output", testing::internal::OutputFlagAlsoCheckEnvVar().c_str()),"A format (defaults to \"xml\" but can be specified to be \"json\"), ""optionally followed by a colon and an output file name or directory. ""A directory is indicated by a trailing pathname separator. ""Examples: \"xml:filename.xml\", \"xml::directoryname/\". ""If a directory is specified, output files will be created ""within that directory, with file-names based on the test ""executable's name and, if necessary, made unique by adding ""digits.")
 
 GTEST_DEFINE_bool_ (brief, testing::internal::BoolFromGTestEnv("brief", false),"True if only test failures should be displayed in text output.")
 
 GTEST_DEFINE_bool_ (print_time, testing::internal::BoolFromGTestEnv("print_time", true),"True if and only if "GTEST_NAME_" should display elapsed time in text output.")
 
 GTEST_DEFINE_bool_ (print_utf8, testing::internal::BoolFromGTestEnv("print_utf8", true),"True if and only if "GTEST_NAME_" prints UTF8 characters as text.")
 
 GTEST_DEFINE_int32_ (random_seed, testing::internal::Int32FromGTestEnv("random_seed", 0),"Random number seed to use when shuffling test orders. Must be in range ""[1, 99999], or 0 to use a seed based on the current time.")
 
 GTEST_DEFINE_int32_ (repeat, testing::internal::Int32FromGTestEnv("repeat", 1),"How many times to repeat each test. Specify a negative number ""for repeating forever. Useful for shaking out flaky tests.")
 
 GTEST_DEFINE_bool_ (recreate_environments_when_repeating, testing::internal::BoolFromGTestEnv("recreate_environments_when_repeating", false),"Controls whether global test environments are recreated for each repeat ""of the tests. If set to false the global test environments are only set ""up once, for the first iteration, and only torn down once, for the last. ""Useful for shaking out flaky tests with stable, expensive test ""environments. If --gtest_repeat is set to a negative number, meaning ""there is no last run, the environments will always be recreated to avoid ""leaks.")
 
 GTEST_DEFINE_bool_ (show_internal_stack_frames, false,"True if and only if "GTEST_NAME_" should include internal stack frames when ""printing test failure stack traces.")
 
 GTEST_DEFINE_bool_ (shuffle, testing::internal::BoolFromGTestEnv("shuffle", false),"True if and only if "GTEST_NAME_" should randomize tests' order on every run.")
 
 GTEST_DEFINE_int32_ (stack_trace_depth, testing::internal::Int32FromGTestEnv("stack_trace_depth", testing::kMaxStackTraceDepth),"The maximum number of stack frames to print when an ""assertion fails. The valid range is 0 through 100, inclusive.")
 
 GTEST_DEFINE_string_ (stream_result_to, testing::internal::StringFromGTestEnv("stream_result_to",""),"This flag specifies the host name and the port number on which to stream ""test results. Example: \"localhost:555\". The flag is effective only on ""Linux and macOS.")
 
 GTEST_DEFINE_bool_ (throw_on_failure, testing::internal::BoolFromGTestEnv("throw_on_failure", false),"When this flag is specified, a failed assertion will throw an exception ""if exceptions are enabled or exit the program with a non-zero code ""otherwise. For use with an external test framework.")
 
static bool testing::internal::GTestIsInitialized ()
 
static int testing::internal::SumOverTestSuiteList (const std::vector< TestSuite * > &case_list, int(TestSuite::*method)() const)
 
static bool testing::internal::TestSuitePassed (const TestSuite *test_suite)
 
static bool testing::internal::TestSuiteFailed (const TestSuite *test_suite)
 
static bool testing::internal::ShouldRunTestSuite (const TestSuite *test_suite)
 
std::set< std::string > * testing::internal::GetIgnoredParameterizedTestSuites ()
 
GTEST_API_ void testing::internal::InsertSyntheticTestCase (const std::string &name, CodeLocation location, bool has_test_p)
 
GTEST_API_ void testing::internal::RegisterTypeParameterizedTestSuite (const char *test_suite_name, CodeLocation code_location)
 
GTEST_API_ void testing::internal::RegisterTypeParameterizedTestSuiteInstantiation (const char *case_name)
 
GTEST_API_ std::vector
< std::string > 
testing::internal::GetArgvs ()
 
static bool testing::internal::PatternMatchesString (const std::string &name_str, const char *pattern, const char *pattern_end)
 
GTEST_API_ TypeId testing::internal::GetTestTypeId ()
 
static AssertionResult testing::internal::HasOneFailure (const char *, const char *, const char *, const TestPartResultArray &results, TestPartResult::Type type, const std::string &substr)
 
GTEST_API_ TimeInMillis testing::internal::GetTimeInMillis ()
 
void testing::internal::SplitString (const ::std::string &str, char delimiter,::std::vector< ::std::string > *dest)
 
GTEST_API_ std::vector< EditType > testing::internal::edit_distance::CalculateOptimalEdits (const std::vector< size_t > &left, const std::vector< size_t > &right)
 
GTEST_API_ std::vector< EditType > testing::internal::edit_distance::CalculateOptimalEdits (const std::vector< std::string > &left, const std::vector< std::string > &right)
 
GTEST_API_ std::string testing::internal::edit_distance::CreateUnifiedDiff (const std::vector< std::string > &left, const std::vector< std::string > &right, size_t context=2)
 
GTEST_API_ AssertionResult testing::internal::EqFailure (const char *expected_expression, const char *actual_expression, const std::string &expected_value, const std::string &actual_value, bool ignoring_case)
 
GTEST_API_ std::string testing::internal::GetBoolAssertionFailureMessage (const AssertionResult &assertion_result, const char *expression_text, const char *actual_predicate_value, const char *expected_predicate_value)
 
GTEST_API_ AssertionResult testing::internal::DoubleNearPredFormat (const char *expr1, const char *expr2, const char *abs_error_expr, double val1, double val2, double abs_error)
 
template<typename RawType >
AssertionResult testing::internal::FloatingPointLE (const char *expr1, const char *expr2, RawType val1, RawType val2)
 
GTEST_API_ AssertionResult testing::FloatLE (const char *expr1, const char *expr2, float val1, float val2)
 
GTEST_API_ AssertionResult testing::DoubleLE (const char *expr1, const char *expr2, double val1, double val2)
 
GTEST_API_ AssertionResult testing::internal::CmpHelperSTREQ (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
 
GTEST_API_ AssertionResult testing::internal::CmpHelperSTRCASEEQ (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
 
GTEST_API_ AssertionResult testing::internal::CmpHelperSTRNE (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
 
GTEST_API_ AssertionResult testing::internal::CmpHelperSTRCASENE (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
 
GTEST_API_ AssertionResult testing::IsSubstring (const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
 
GTEST_API_ AssertionResult testing::IsSubstring (const char *needle_expr, const char *haystack_expr, const wchar_t *needle, const wchar_t *haystack)
 
GTEST_API_ AssertionResult testing::IsNotSubstring (const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
 
GTEST_API_ AssertionResult testing::IsNotSubstring (const char *needle_expr, const char *haystack_expr, const wchar_t *needle, const wchar_t *haystack)
 
GTEST_API_ AssertionResult testing::IsSubstring (const char *needle_expr, const char *haystack_expr, const ::std::string &needle, const ::std::string &haystack)
 
GTEST_API_ AssertionResult testing::IsNotSubstring (const char *needle_expr, const char *haystack_expr, const ::std::string &needle, const ::std::string &haystack)
 
uint32_t testing::internal::ChopLowBits (uint32_t *bits, int n)
 
GTEST_API_ std::string testing::internal::CodePointToUtf8 (uint32_t code_point)
 
bool testing::internal::IsUtf16SurrogatePair (wchar_t first, wchar_t second)
 
uint32_t testing::internal::CreateCodePointFromUtf16SurrogatePair (wchar_t first, wchar_t second)
 
GTEST_API_ std::string testing::internal::WideStringToUtf8 (const wchar_t *str, int num_chars)
 
GTEST_API_ AssertionResult testing::internal::CmpHelperSTREQ (const char *s1_expression, const char *s2_expression, const wchar_t *s1, const wchar_t *s2)
 
GTEST_API_ AssertionResult testing::internal::CmpHelperSTRNE (const char *s1_expression, const char *s2_expression, const wchar_t *s1, const wchar_t *s2)
 
GTEST_API_ std::string testing::internal::StringStreamToString (::std::stringstream *stream)
 
GTEST_API_ std::string testing::internal::AppendUserMessage (const std::string &gtest_msg, const Message &user_msg)
 
template<size_t kSize>
std::vector< std::string > testing::ArrayAsVector (const char *const (&array)[kSize])
 
static std::vector< std::string > testing::GetReservedAttributesForElement (const std::string &xml_element)
 
static std::string testing::FormatWordList (const std::vector< std::string > &words)
 
static bool testing::ValidateTestPropertyName (const std::string &property_name, const std::vector< std::string > &reserved_names)
 
static bool testing::TestPartSkipped (const TestPartResult &result)
 
static bool testing::TestPartFatallyFailed (const TestPartResult &result)
 
static bool testing::TestPartNonfatallyFailed (const TestPartResult &result)
 
void testing::internal::ReportFailureInUnknownLocation (TestPartResult::Type result_type, const std::string &message)
 
template<class T , typename Result >
Result testing::internal::HandleSehExceptionsInMethodIfSupported (T *object, Result(T::*method)(), const char *location)
 
template<class T , typename Result >
Result testing::internal::HandleExceptionsInMethodIfSupported (T *object, Result(T::*method)(), const char *location)
 
GTEST_API_ TestInfo * testing::internal::MakeAndRegisterTestInfo (std::string test_suite_name, const char *name, const char *type_param, const char *value_param, CodeLocation code_location, TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc, TearDownTestSuiteFunc tear_down_tc, TestFactoryBase *factory)
 
GTEST_API_ void testing::internal::ReportInvalidTestSuiteType (const char *test_suite_name, const CodeLocation &code_location)
 
static std::string testing::FormatCountableNoun (int count, const char *singular_form, const char *plural_form)
 
static std::string testing::FormatTestCount (int test_count)
 
static std::string testing::FormatTestSuiteCount (int test_suite_count)
 
static const char * testing::TestPartResultTypeToString (TestPartResult::Type type)
 
static std::string testing::internal::PrintTestPartResultToString (const TestPartResult &test_part_result)
 
static void testing::internal::PrintTestPartResult (const TestPartResult &test_part_result)
 
static const char * testing::internal::GetAnsiColorCode (GTestColor color)
 
GTEST_API_ bool testing::internal::ShouldUseColor (bool stdout_is_tty)
 
static void testing::internal::ColoredPrintf (GTestColor color, const char *fmt,...)
 
static void testing::internal::PrintFullTestCommentIfPresent (const TestInfo &test_info)
 
static void testing::internal::SetUpEnvironment (Environment *env)
 
static void testing::internal::TearDownEnvironment (Environment *env)
 
GTEST_API_ bool testing::internal::ShouldShard (const char *total_shards_str, const char *shard_index_str, bool in_subprocess_for_death_test)
 
GTEST_API_ int32_t testing::internal::Int32FromEnvOrDie (const char *env_var, int32_t default_val)
 
GTEST_API_ bool testing::internal::ShouldRunTestOnShard (int total_shards, int shard_index, int test_id)
 
static void testing::internal::PrintOnOneLine (const char *str, int max_length)
 
GTEST_API_ std::string testing::internal::GetCurrentOsStackTraceExceptTop (int skip_count)
 
GTEST_API_ bool testing::internal::IsTrue (bool condition)
 
GTEST_API_ bool testing::internal::AlwaysTrue ()
 
GTEST_API_ bool testing::internal::SkipPrefix (const char *prefix, const char **pstr)
 
static const char * testing::internal::ParseFlagValue (const char *str, const char *flag_name, bool def_optional)
 
static bool testing::internal::ParseFlag (const char *str, const char *flag_name, bool *value)
 
GTEST_API_ bool testing::internal::ParseFlag (const char *str, const char *flag, int32_t *value)
 
template<typename String >
static bool testing::internal::ParseFlag (const char *str, const char *flag_name, String *value)
 
static bool testing::internal::HasGoogleTestFlagPrefix (const char *str)
 
static void testing::internal::PrintColorEncoded (const char *str)
 
static bool testing::internal::ParseGoogleTestFlag (const char *const arg)
 
template<typename CharType >
void testing::internal::ParseGoogleTestFlagsOnlyImpl (int *argc, CharType **argv)
 
GTEST_API_ void testing::internal::ParseGoogleTestFlagsOnly (int *argc, char **argv)
 
GTEST_API_ void testing::internal::ParseGoogleTestFlagsOnly (int *argc, wchar_t **argv)
 
template<typename CharType >
void testing::internal::InitGoogleTestImpl (int *argc, CharType **argv)
 
GTEST_API_ void testing::InitGoogleTest (int *argc, char **argv)
 
GTEST_API_ void testing::InitGoogleTest (int *argc, wchar_t **argv)
 
GTEST_API_ void testing::InitGoogleTest ()
 
static std::string testing::GetDirFromEnv (std::initializer_list< const char * > environment_variables, const char *fallback, char separator)
 
GTEST_API_ std::string testing::TempDir ()
 

Variables

static const char testing::kDisableTestFilter [] = "DISABLED_*:*/DISABLED_*"
 
static const char testing::kDeathTestSuiteFilter [] = "*DeathTest:*DeathTest/*"
 
static const char testing::kUniversalFilter [] = "*"
 
static const char testing::kDefaultOutputFormat [] = "xml"
 
static const char testing::kDefaultOutputFile [] = "test_detail"
 
static const char testing::kTestShardIndex [] = "GTEST_SHARD_INDEX"
 
static const char testing::kTestTotalShards [] = "GTEST_TOTAL_SHARDS"
 
static const char testing::kTestShardStatusFile [] = "GTEST_SHARD_STATUS_FILE"
 
static::std::vector< std::string > testing::internal::g_argvs
 
constexpr uint32_t testing::internal::kMaxCodePoint1 = (static_cast<uint32_t>(1) << 7) - 1
 
constexpr uint32_t testing::internal::kMaxCodePoint2 = (static_cast<uint32_t>(1) << (5 + 6)) - 1
 
constexpr uint32_t testing::internal::kMaxCodePoint3
 
constexpr uint32_t testing::internal::kMaxCodePoint4
 
static const char *const testing::kReservedTestSuitesAttributes []
 
static const char *const testing::kReservedTestSuiteAttributes []
 
static const char *const testing::kReservedTestCaseAttributes []
 
static const char *const testing::kReservedOutputTestCaseAttributes []
 
static const char testing::internal::kTypeParamLabel [] = "TypeParam"
 
static const char testing::internal::kValueParamLabel [] = "GetParam()"
 
static const char testing::internal::kColorEncodedHelpMessage []
 

Macro Definition Documentation

#define GTEST_HAS_BUILTIN (   x)    0

Definition at line 162 of file gtest.cc.

#define GTEST_REPEATER_METHOD_ (   Name,
  Type 
)
Value:
void TestEventRepeater::Name(const Type& parameter) { \
if (forwarding_enabled_) { \
for (size_t i = 0; i < listeners_.size(); i++) { \
listeners_[i]->Name(parameter); \
} \
} \
}
if(first)
Definition: uninit.c:110

Definition at line 3868 of file gtest.cc.

#define GTEST_REVERSE_REPEATER_METHOD_ (   Name,
  Type 
)
Value:
void TestEventRepeater::Name(const Type& parameter) { \
if (forwarding_enabled_) { \
for (size_t i = listeners_.size(); i != 0; i--) { \
listeners_[i - 1]->Name(parameter); \
} \
} \
}
if(first)
Definition: uninit.c:110

Definition at line 3878 of file gtest.cc.

#define GTEST_INTERNAL_PARSE_FLAG (   flag_name)
Value:
do { \
auto value = GTEST_FLAG_GET(flag_name); \
if (ParseFlag(arg, #flag_name, &value)) { \
GTEST_FLAG_SET(flag_name, value); \
return true; \
} \
} while (false)
#define GTEST_FLAG_SET(name, value)
Definition: gtest-port.h:2343
int value
#define GTEST_FLAG_GET(name)
Definition: gtest-port.h:2342
GTEST_API_ bool ParseFlag(const char *str, const char *flag, int32_t *value)
Definition: gtest.cc:6481
if(first)
Definition: uninit.c:110

Function Documentation

GTEST_DEFINE_bool_ ( fail_fast  ,
testing::internal::  BoolFromGTestEnv"fail_fast", testing::GetDefaultFailFast(),
"True if and only if a test failure should stop further test execution."   
)
GTEST_DEFINE_bool_ ( also_run_disabled_tests  ,
testing::internal::  BoolFromGTestEnv"also_run_disabled_tests", false,
"Run disabled tests  too,
in addition to the tests normally being run."   
)
GTEST_DEFINE_bool_ ( break_on_failure  ,
testing::internal::  BoolFromGTestEnv"break_on_failure", false,
"True if and only if a failed assertion should be a debugger ""break-point."   
)
GTEST_DEFINE_bool_ ( catch_exceptions  ,
testing::internal::  BoolFromGTestEnv"catch_exceptions", true,
"True if and only if "GTEST_NAME_" should catch exceptions and treat them as test failures."   
)
GTEST_DEFINE_string_ ( color  ,
testing::internal::  StringFromGTestEnv"color","auto",
"Whether to use colors in the output. Valid values:  yes,
no  ,
""and auto. 'auto'means to use colors if the output is""being sent to a terminal and the TERM environment variable""is set to a terminal type that supports colors."   
)
GTEST_DEFINE_string_ ( filter  ,
testing::internal::  StringFromGTestEnv"filter", testing::GetDefaultFilter(),
"A colon-separated list of glob (not regex) patterns ""for filtering the tests to  run,
optionally followed by a""'-'and a:separated list of negative patterns(tests to""exclude).A test is run if it matches one of the positive""patterns and does not match any of the negative patterns."   
)
GTEST_DEFINE_bool_ ( install_failure_signal_handler  ,
testing::internal::  BoolFromGTestEnv"install_failure_signal_handler", false,
"If true and supported on the current  platform,
"GTEST_NAME_"should""install a signal handler that dumps debugging information when fatal""signals are raised."   
)
GTEST_DEFINE_bool_ ( list_tests  ,
false  ,
"List all tests without running them."   
)
GTEST_DEFINE_string_ ( output  ,
testing::internal::  StringFromGTestEnv"output", testing::internal::OutputFlagAlsoCheckEnvVar().c_str(),
"A format   defaults to \"xml\" but can be specified to be \"json\",
""optionally followed by a colon and an output file name or directory.""A directory is indicated by a trailing pathname separator.""Examples:\"xml:filename.xml\"  ,
\"xml::directoryname/\". ""If a directory is  specified,
output files will be created""within that  directory,
with file-names based on the test""executable's name  and,
if  necessary,
made unique by adding""digits."   
)
GTEST_DEFINE_bool_ ( brief  ,
testing::internal::  BoolFromGTestEnv"brief", false,
"True if only test failures should be displayed in text output."   
)
GTEST_DEFINE_bool_ ( print_time  ,
testing::internal::  BoolFromGTestEnv"print_time", true,
"True if and only if "GTEST_NAME_" should display elapsed time in text output."   
)
GTEST_DEFINE_bool_ ( print_utf8  ,
testing::internal::  BoolFromGTestEnv"print_utf8", true,
"True if and only if "GTEST_NAME_" prints UTF8 characters as text."   
)
GTEST_DEFINE_int32_ ( random_seed  ,
testing::internal::  Int32FromGTestEnv"random_seed", 0,
"Random number seed to use when shuffling test orders. Must be in range ""  [1, 99999],
or 0 to use a seed based on the current time."   
)
GTEST_DEFINE_int32_ ( repeat  ,
testing::internal::  Int32FromGTestEnv"repeat", 1,
"How many times to repeat each test. Specify a negative number ""for repeating forever. Useful for shaking out flaky tests."   
)
GTEST_DEFINE_bool_ ( recreate_environments_when_repeating  ,
testing::internal::  BoolFromGTestEnv"recreate_environments_when_repeating", false,
"Controls whether global test environments are recreated for each repeat ""of the tests. If set to false the global test environments are only set ""up  once,
for the first  iteration,
and only torn down  once,
for the last.""Useful for shaking out flaky tests with  stable,
expensive test""environments.If--gtest_repeat is set to a negative  number,
meaning""there is no last  run,
the environments will always be recreated to avoid""leaks."   
)
GTEST_DEFINE_bool_ ( show_internal_stack_frames  ,
false  ,
"True if and only if "GTEST_NAME_" should include internal stack frames when ""printing test failure stack traces."   
)
GTEST_DEFINE_bool_ ( shuffle  ,
testing::internal::  BoolFromGTestEnv"shuffle", false,
"True if and only if "GTEST_NAME_" should randomize tests' order on every run."   
)
GTEST_DEFINE_int32_ ( stack_trace_depth  ,
testing::internal::  Int32FromGTestEnv"stack_trace_depth", testing::kMaxStackTraceDepth,
"The maximum number of stack frames to print when an ""assertion fails. The valid range is 0 through  100,
inclusive."   
)
GTEST_DEFINE_string_ ( stream_result_to  ,
testing::internal::  StringFromGTestEnv"stream_result_to","",
"This flag specifies the host name and the port number on which to stream ""test results. Example: \"localhost:555\". The flag is effective only on ""Linux and macOS."   
)
GTEST_DEFINE_bool_ ( throw_on_failure  ,
testing::internal::  BoolFromGTestEnv"throw_on_failure", false,
"When this flag is  specified,
a failed assertion will throw an exception""if exceptions are enabled or exit the program with a non-zero code""otherwise.For use with an external test framework."   
)

Variable Documentation

const CodeLocation loc_

Definition at line 515 of file gtest.cc.

const std::string error_message_

Definition at line 516 of file gtest.cc.

const bool as_error_

Definition at line 517 of file gtest.cc.

std::vector<std::string> glob_patterns_

Definition at line 817 of file gtest.cc.

std::unordered_set<std::string> exact_match_patterns_

Definition at line 818 of file gtest.cc.

UnitTestFilter positive_filter_

Definition at line 871 of file gtest.cc.

UnitTestFilter negative_filter_

Definition at line 872 of file gtest.cc.

IdMap ids_

Definition at line 1405 of file gtest.cc.

size_t left_start_

Definition at line 1495 of file gtest.cc.

size_t right_start_

Definition at line 1495 of file gtest.cc.

size_t adds_

Definition at line 1496 of file gtest.cc.

size_t removes_

Definition at line 1496 of file gtest.cc.

size_t common_

Definition at line 1496 of file gtest.cc.

std::list<std::pair<char, const char*> > hunk_

Definition at line 1497 of file gtest.cc.

std::list<std::pair<char, const char*> > hunk_adds_

Definition at line 1497 of file gtest.cc.

std::list<std::pair<char, const char*> > hunk_removes_

Definition at line 1497 of file gtest.cc.