tesseract v5.3.3.20231005
testing Namespace Reference

Namespaces

namespace  gmock_function_mocker_test
 
namespace  gmock_matchers_test
 
namespace  gmock_more_actions_test
 
namespace  gmock_nice_strict_test
 
namespace  gtest_printers_test
 
namespace  internal
 

Classes

class  Action
 
class  ActionInterface
 
class  CodeLocationForTESTF
 
class  CodeLocationForTESTP
 
class  CodeLocationForTYPEDTEST
 
class  CodeLocationForTYPEDTESTP
 
class  CurrentTestInfoTest
 
class  DefaultValue
 
class  DefaultValue< T & >
 
class  DefaultValue< void >
 
class  EmptyTestEventListener
 
class  Environment
 
struct  Flags
 
class  Matcher
 
class  Message
 
class  NaggyMock
 
class  NiceMock
 
class  ParseFlagsTest
 
class  PolymorphicAction
 
struct  PrintToStringParamName
 
class  ScopedTrace
 
class  SetUpTestCaseTest
 
class  SetUpTestSuiteTest
 
class  StrictMock
 
class  Test
 
class  TestEventListener
 
class  TestEventListeners
 
class  TestInfo
 
class  TestInfoTest
 
struct  TestParamInfo
 
class  TestProperty
 
class  TestResult
 
class  TestSuite
 
class  TestWithParam
 
class  UnitTest
 
class  WithParamInterface
 

Typedefs

typedef internal::IgnoredValue Unused
 
typedef internal::TimeInMillis TimeInMillis
 
template<typename... Ts>
using Types = internal::ProxyTypeList< Ts... >
 

Functions

template<typename F >
Action< F > MakeAction (ActionInterface< F > *impl)
 
template<typename Impl >
PolymorphicAction< Impl > MakePolymorphicAction (const Impl &impl)
 
template<typename... Action>
internal::DoAllAction< typename std::decay< Action >::type... > DoAll (Action &&... action)
 
template<size_t k, typename InnerAction >
internal::WithArgsAction< typename std::decay< InnerAction >::type, k > WithArg (InnerAction &&action)
 
template<size_t k, size_t... ks, typename InnerAction >
internal::WithArgsAction< typename std::decay< InnerAction >::type, k, ks... > WithArgs (InnerAction &&action)
 
template<typename InnerAction >
internal::WithArgsAction< typename std::decay< InnerAction >::type > WithoutArgs (InnerAction &&action)
 
template<typename R >
internal::ReturnAction< R > Return (R value)
 
PolymorphicAction< internal::ReturnNullActionReturnNull ()
 
PolymorphicAction< internal::ReturnVoidActionReturn ()
 
template<typename R >
internal::ReturnRefAction< R > ReturnRef (R &x)
 
template<typename R , R * = nullptr>
internal::ReturnRefAction< R > ReturnRef (R &&)=delete
 
template<typename R >
internal::ReturnRefOfCopyAction< R > ReturnRefOfCopy (const R &x)
 
template<typename R >
internal::ByMoveWrapper< R > ByMove (R x)
 
template<typename T >
internal::ReturnRoundRobinAction< T > ReturnRoundRobin (std::vector< T > vals)
 
template<typename T >
internal::ReturnRoundRobinAction< T > ReturnRoundRobin (std::initializer_list< T > vals)
 
internal::DoDefaultAction DoDefault ()
 
template<size_t N, typename T >
internal::SetArgumentPointeeAction< N, T > SetArgPointee (T value)
 
template<size_t N, typename T >
internal::SetArgumentPointeeAction< N, T > SetArgumentPointee (T value)
 
template<typename T1 , typename T2 >
PolymorphicAction< internal::AssignAction< T1, T2 > > Assign (T1 *ptr, T2 val)
 
template<typename T >
PolymorphicAction< internal::SetErrnoAndReturnAction< T > > SetErrnoAndReturn (int errval, T result)
 
template<typename FunctionImpl >
std::decay< FunctionImpl >::type Invoke (FunctionImpl &&function_impl)
 
template<class Class , typename MethodPtr >
internal::InvokeMethodAction< Class, MethodPtr > Invoke (Class *obj_ptr, MethodPtr method_ptr)
 
template<typename FunctionImpl >
internal::InvokeWithoutArgsAction< typename std::decay< FunctionImpl >::type > InvokeWithoutArgs (FunctionImpl function_impl)
 
template<class Class , typename MethodPtr >
internal::InvokeMethodWithoutArgsAction< Class, MethodPtr > InvokeWithoutArgs (Class *obj_ptr, MethodPtr method_ptr)
 
template<typename A >
internal::IgnoreResultAction< A > IgnoreResult (const A &an_action)
 
template<typename T >
inline ::std::reference_wrapper< T > ByRef (T &l_value)
 
template<typename T , typename... Params>
internal::ReturnNewAction< T, typename std::decay< Params >::type... > ReturnNew (Params &&... params)
 
template<size_t k>
internal::ReturnArgAction< k > ReturnArg ()
 
template<size_t k, typename Ptr >
internal::SaveArgAction< k, Ptr > SaveArg (Ptr pointer)
 
template<size_t k, typename Ptr >
internal::SaveArgPointeeAction< k, Ptr > SaveArgPointee (Ptr pointer)
 
template<size_t k, typename T >
internal::SetArgRefereeAction< k, typename std::decay< T >::type > SetArgReferee (T &&value)
 
template<size_t k, typename I1 , typename I2 >
internal::SetArrayArgumentAction< k, I1, I2 > SetArrayArgument (I1 first, I2 last)
 
template<size_t k>
internal::DeleteArgAction< k > DeleteArg ()
 
template<typename Ptr >
internal::ReturnPointeeAction< Ptr > ReturnPointee (Ptr pointer)
 
template<std::size_t index, typename... Params>
internal::InvokeArgumentAction< index, typename std::decay< Params >::type... > InvokeArgument (Params &&... params)
 
 MATCHER (IsEmpty, negation ? "isn't empty" :"is empty")
 
 MATCHER (IsTrue, negation ? "is false" :"is true")
 
 MATCHER (IsFalse, negation ? "is true" :"is false")
 
 GMOCK_DECLARE_bool_ (catch_leaked_mocks)
 
 GMOCK_DECLARE_string_ (verbose)
 
 GMOCK_DECLARE_int32_ (default_mock_behavior)
 
GTEST_API_ void InitGoogleMock (int *argc, char **argv)
 
GTEST_API_ void InitGoogleMock (int *argc, wchar_t **argv)
 
GTEST_API_ void InitGoogleMock ()
 
GTEST_API_ Cardinality AtLeast (int n)
 
GTEST_API_ Cardinality AtMost (int n)
 
GTEST_API_ Cardinality AnyNumber ()
 
GTEST_API_ Cardinality Between (int min, int max)
 
GTEST_API_ Cardinality Exactly (int n)
 
 GMOCK_DEFINE_bool_ (catch_leaked_mocks, true, "true if and only if Google Mock should report leaked " "mock objects as failures.")
 
 GMOCK_DEFINE_string_ (verbose, internal::kWarningVerbosity, "Controls how verbose Google Mock's output is." " Valid values:\n" " info - prints all messages.\n" " warning - prints warnings and errors.\n" " error - prints errors only.")
 
 GMOCK_DEFINE_int32_ (default_mock_behavior, 1, "Controls the default behavior of mocks." " Valid values:\n" " 0 - by default, mocks act as NiceMocks.\n" " 1 - by default, mocks act as NaggyMocks.\n" " 2 - by default, mocks act as StrictMocks.")
 
 GTEST_DECLARE_string_ (death_test_style)
 
std::ostream & operator<< (std::ostream &os, const Message &sb)
 
template<typename T , typename IncrementT >
internal::ParamGenerator< T > Range (T start, T end, IncrementT step)
 
template<typename T >
internal::ParamGenerator< T > Range (T start, T end)
 
template<typename ForwardIterator >
internal::ParamGenerator< typename std::iterator_traits< ForwardIterator >::value_type > ValuesIn (ForwardIterator begin, ForwardIterator end)
 
template<typename T , size_t N>
internal::ParamGenerator< T > ValuesIn (const T(&array)[N])
 
template<class Container >
internal::ParamGenerator< typename Container::value_type > ValuesIn (const Container &container)
 
template<typename... T>
internal::ValueArray< T... > Values (T... v)
 
internal::ParamGenerator< bool > Bool ()
 
template<typename... Generator>
internal::CartesianProductHolder< Generator... > Combine (const Generator &... g)
 
template<typename T >
::std::string PrintToString (const T &value)
 
EnvironmentAddGlobalTestEnvironment (Environment *env)
 
GTEST_API_ void InitGoogleTest (int *argc, char **argv)
 
GTEST_API_ void InitGoogleTest (int *argc, wchar_t **argv)
 
GTEST_API_ void InitGoogleTest ()
 
GTEST_API_ AssertionResult IsSubstring (const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
 
GTEST_API_ AssertionResult IsSubstring (const char *needle_expr, const char *haystack_expr, const wchar_t *needle, const wchar_t *haystack)
 
GTEST_API_ AssertionResult IsNotSubstring (const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
 
GTEST_API_ AssertionResult IsNotSubstring (const char *needle_expr, const char *haystack_expr, const wchar_t *needle, const wchar_t *haystack)
 
GTEST_API_ AssertionResult IsSubstring (const char *needle_expr, const char *haystack_expr, const ::std::string &needle, const ::std::string &haystack)
 
GTEST_API_ AssertionResult IsNotSubstring (const char *needle_expr, const char *haystack_expr, const ::std::string &needle, const ::std::string &haystack)
 
GTEST_API_ AssertionResult FloatLE (const char *expr1, const char *expr2, float val1, float val2)
 
GTEST_API_ AssertionResult DoubleLE (const char *expr1, const char *expr2, double val1, double val2)
 
template<typename T1 , typename T2 >
constexpr bool StaticAssertTypeEq () noexcept
 
GTEST_API_ std::string TempDir ()
 
template<int &... ExplicitParameterBarrier, typename Factory >
TestInfoRegisterTest (const char *test_suite_name, const char *test_name, const char *type_param, const char *value_param, const char *file, int line, Factory factory)
 
template<typename Pred , typename T1 >
AssertionResult AssertPred1Helper (const char *pred_text, const char *e1, Pred pred, const T1 &v1)
 
template<typename Pred , typename T1 , typename T2 >
AssertionResult AssertPred2Helper (const char *pred_text, const char *e1, const char *e2, Pred pred, const T1 &v1, const T2 &v2)
 
template<typename Pred , typename T1 , typename T2 , typename T3 >
AssertionResult AssertPred3Helper (const char *pred_text, const char *e1, const char *e2, const char *e3, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3)
 
template<typename Pred , typename T1 , typename T2 , typename T3 , typename T4 >
AssertionResult AssertPred4Helper (const char *pred_text, const char *e1, const char *e2, const char *e3, const char *e4, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4)
 
template<typename Pred , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
AssertionResult AssertPred5Helper (const char *pred_text, const char *e1, const char *e2, const char *e3, const char *e4, const char *e5, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5)
 
 GTEST_DEFINE_string_ (death_test_style, internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle), "Indicates how to run a death test in a forked child process: " "\"threadsafe\" (child process re-executes the test binary " "from the beginning, running only the specific death test) or " "\"fast\" (child process runs the death test immediately " "after forking).")
 
 GTEST_DEFINE_bool_ (death_test_use_fork, internal::BoolFromGTestEnv("death_test_use_fork", false), "Instructs to use fork()/_exit() instead of clone() in death tests. " "Ignored and always uses fork() on POSIX systems where clone() is not " "implemented. Useful when running under valgrind or similar tools if " "those do not support clone(). Valgrind 3.3.1 will just fail if " "it sees an unsupported combination of clone() flags. " "It is not recommended to use this flag w/o valgrind though it will " "work in 99% of the cases. Once valgrind is fixed, this flag will " "most likely be removed.")
 
std::ostream & operator<< (std::ostream &os, const TestPartResult &result)
 
 GTEST_DEFINE_bool_ (fail_fast, internal::BoolFromGTestEnv("fail_fast", GetDefaultFailFast()), "True if and only if a test failure should stop further test execution.")
 
 GTEST_DEFINE_bool_ (also_run_disabled_tests, 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, 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, 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, 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, internal::StringFromGTestEnv("filter", 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, 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, internal::StringFromGTestEnv("output", 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, internal::BoolFromGTestEnv("brief", false), "True if only test failures should be displayed in text output.")
 
 GTEST_DEFINE_bool_ (print_time, internal::BoolFromGTestEnv("print_time", true), "True if and only if " GTEST_NAME_ " should display elapsed time in text output.")
 
 GTEST_DEFINE_bool_ (print_utf8, internal::BoolFromGTestEnv("print_utf8", true), "True if and only if " GTEST_NAME_ " prints UTF8 characters as text.")
 
 GTEST_DEFINE_int32_ (random_seed, 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, 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_ (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, internal::BoolFromGTestEnv("shuffle", false), "True if and only if " GTEST_NAME_ " should randomize tests' order on every run.")
 
 GTEST_DEFINE_int32_ (stack_trace_depth, internal::Int32FromGTestEnv("stack_trace_depth", 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, 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.")
 
 GTEST_DEFINE_bool_ (throw_on_failure, 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.")
 
AssertionResult AssertionSuccess ()
 
AssertionResult AssertionFailure ()
 
AssertionResult AssertionFailure (const Message &message)
 
template<size_t kSize>
std::vector< std::string > ArrayAsVector (const char *const (&array)[kSize])
 
 TEST (GTestEnvVarTest, Dummy)
 
void PrintFlag (const char *flag)
 
 GTEST_DECLARE_string_ (filter)
 
 GTEST_DECLARE_int32_ (repeat)
 
 TEST (SuccessfulAssertionTest, SUCCEED)
 
 TEST (SuccessfulAssertionTest, EXPECT)
 
 TEST (SuccessfulAssertionTest, EXPECT_STR)
 
 TEST (SuccessfulAssertionTest, ASSERT)
 
 TEST (SuccessfulAssertionTest, ASSERT_STR)
 
 TEST_F (TestInfoTest, Names)
 
 TEST_F (TestInfoTest, result)
 
 TEST (CodeLocationForTEST, Verify)
 
 TEST_F (CodeLocationForTESTF, Verify)
 
 TEST_P (CodeLocationForTESTP, Verify)
 
 INSTANTIATE_TEST_SUITE_P (, CodeLocationForTESTP, Values(0))
 
 TYPED_TEST_SUITE (CodeLocationForTYPEDTEST, int)
 
 TYPED_TEST (CodeLocationForTYPEDTEST, Verify)
 
 TYPED_TEST_SUITE_P (CodeLocationForTYPEDTESTP)
 
 TYPED_TEST_P (CodeLocationForTYPEDTESTP, Verify)
 
 REGISTER_TYPED_TEST_SUITE_P (CodeLocationForTYPEDTESTP, Verify)
 
 INSTANTIATE_TYPED_TEST_SUITE_P (My, CodeLocationForTYPEDTESTP, int)
 
 TEST_F (SetUpTestCaseTest, Test1)
 
 TEST_F (SetUpTestCaseTest, Test2)
 
 TEST_F (SetUpTestSuiteTest, TestSetupTestSuite1)
 
 TEST_F (SetUpTestSuiteTest, TestSetupTestSuite2)
 
 TEST_F (ParseFlagsTest, Empty)
 
 TEST_F (ParseFlagsTest, NoFlag)
 
 TEST_F (ParseFlagsTest, FailFast)
 
 TEST_F (ParseFlagsTest, FilterBad)
 
 TEST_F (ParseFlagsTest, FilterEmpty)
 
 TEST_F (ParseFlagsTest, FilterNonEmpty)
 
 TEST_F (ParseFlagsTest, BreakOnFailureWithoutValue)
 
 TEST_F (ParseFlagsTest, BreakOnFailureFalse_0)
 
 TEST_F (ParseFlagsTest, BreakOnFailureFalse_f)
 
 TEST_F (ParseFlagsTest, BreakOnFailureFalse_F)
 
 TEST_F (ParseFlagsTest, BreakOnFailureTrue)
 
 TEST_F (ParseFlagsTest, CatchExceptions)
 
 TEST_F (ParseFlagsTest, DeathTestUseFork)
 
 TEST_F (ParseFlagsTest, DuplicatedFlags)
 
 TEST_F (ParseFlagsTest, UnrecognizedFlag)
 
 TEST_F (ParseFlagsTest, ListTestsFlag)
 
 TEST_F (ParseFlagsTest, ListTestsTrue)
 
 TEST_F (ParseFlagsTest, ListTestsFalse)
 
 TEST_F (ParseFlagsTest, ListTestsFalse_f)
 
 TEST_F (ParseFlagsTest, ListTestsFalse_F)
 
 TEST_F (ParseFlagsTest, OutputEmpty)
 
 TEST_F (ParseFlagsTest, OutputXml)
 
 TEST_F (ParseFlagsTest, OutputXmlFile)
 
 TEST_F (ParseFlagsTest, OutputXmlDirectory)
 
 TEST_F (ParseFlagsTest, BriefFlag)
 
 TEST_F (ParseFlagsTest, BriefFlagTrue)
 
 TEST_F (ParseFlagsTest, BriefFlagFalse)
 
 TEST_F (ParseFlagsTest, PrintTimeFlag)
 
 TEST_F (ParseFlagsTest, PrintTimeTrue)
 
 TEST_F (ParseFlagsTest, PrintTimeFalse)
 
 TEST_F (ParseFlagsTest, PrintTimeFalse_f)
 
 TEST_F (ParseFlagsTest, PrintTimeFalse_F)
 
 TEST_F (ParseFlagsTest, RandomSeed)
 
 TEST_F (ParseFlagsTest, Repeat)
 
 TEST_F (ParseFlagsTest, AlsoRunDisabledTestsFlag)
 
 TEST_F (ParseFlagsTest, AlsoRunDisabledTestsTrue)
 
 TEST_F (ParseFlagsTest, AlsoRunDisabledTestsFalse)
 
 TEST_F (ParseFlagsTest, ShuffleWithoutValue)
 
 TEST_F (ParseFlagsTest, ShuffleFalse_0)
 
 TEST_F (ParseFlagsTest, ShuffleTrue)
 
 TEST_F (ParseFlagsTest, StackTraceDepth)
 
 TEST_F (ParseFlagsTest, StreamResultTo)
 
 TEST_F (ParseFlagsTest, ThrowOnFailureWithoutValue)
 
 TEST_F (ParseFlagsTest, ThrowOnFailureFalse_0)
 
 TEST_F (ParseFlagsTest, ThrowOnFailureTrue)
 
 TEST_F (CurrentTestInfoTest, WorksForFirstTestInATestSuite)
 
 TEST_F (CurrentTestInfoTest, WorksForSecondTestInATestSuite)
 

Variables

class GTEST_API_ testing::ScopedTrace GTEST_ATTRIBUTE_UNUSED_
 

Typedef Documentation

◆ TimeInMillis

Definition at line 528 of file gtest.h.

◆ Types

template<typename... Ts>
using testing::Types = typedef internal::ProxyTypeList<Ts...>

Definition at line 179 of file gtest-type-util.h.

◆ Unused

Definition at line 1198 of file gmock-actions.h.

Function Documentation

◆ AddGlobalTestEnvironment()

Environment * testing::AddGlobalTestEnvironment ( Environment env)
inline

Definition at line 1493 of file gtest.h.

1493 {
1494 return UnitTest::GetInstance()->AddEnvironment(env);
1495}

◆ AnyNumber()

GTEST_API_ Cardinality testing::AnyNumber ( )

Definition at line 145 of file gmock-cardinalities.cc.

145{ return AtLeast(0); }
GTEST_API_ Cardinality AtLeast(int n)

◆ ArrayAsVector()

template<size_t kSize>
std::vector< std::string > testing::ArrayAsVector ( const char *const (&)  array[kSize])

Definition at line 2286 of file gtest.cc.

2286 {
2287 return std::vector<std::string>(array, array + kSize);
2288}

◆ AssertionFailure() [1/2]

AssertionResult testing::AssertionFailure ( )

Definition at line 1214 of file gtest.cc.

1214 {
1215 return AssertionResult(false);
1216}

◆ AssertionFailure() [2/2]

AssertionResult testing::AssertionFailure ( const Message message)

Definition at line 1220 of file gtest.cc.

1220 {
1221 return AssertionFailure() << message;
1222}
AssertionResult AssertionFailure(const Message &message)
Definition: gtest.cc:1220

◆ AssertionSuccess()

AssertionResult testing::AssertionSuccess ( )

Definition at line 1209 of file gtest.cc.

1209 {
1210 return AssertionResult(true);
1211}

◆ AssertPred1Helper()

template<typename Pred , typename T1 >
AssertionResult testing::AssertPred1Helper ( const char *  pred_text,
const char *  e1,
Pred  pred,
const T1 v1 
)

Definition at line 87 of file gtest_pred_impl.h.

90 {
91 if (pred(v1)) return AssertionSuccess();
92
93 return AssertionFailure()
94 << pred_text << "(" << e1 << ") evaluates to false, where"
95 << "\n"
96 << e1 << " evaluates to " << ::testing::PrintToString(v1);
97}
AssertionResult AssertionFailure()
Definition: gtest.cc:1214
::std::string PrintToString(const T &value)
AssertionResult AssertionSuccess()
Definition: gtest.cc:1209

◆ AssertPred2Helper()

template<typename Pred , typename T1 , typename T2 >
AssertionResult testing::AssertPred2Helper ( const char *  pred_text,
const char *  e1,
const char *  e2,
Pred  pred,
const T1 v1,
const T2 v2 
)

Definition at line 130 of file gtest_pred_impl.h.

135 {
136 if (pred(v1, v2)) return AssertionSuccess();
137
138 return AssertionFailure()
139 << pred_text << "(" << e1 << ", " << e2
140 << ") evaluates to false, where"
141 << "\n"
142 << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
143 << e2 << " evaluates to " << ::testing::PrintToString(v2);
144}

◆ AssertPred3Helper()

template<typename Pred , typename T1 , typename T2 , typename T3 >
AssertionResult testing::AssertPred3Helper ( const char *  pred_text,
const char *  e1,
const char *  e2,
const char *  e3,
Pred  pred,
const T1 v1,
const T2 v2,
const T3 v3 
)

Definition at line 180 of file gtest_pred_impl.h.

187 {
188 if (pred(v1, v2, v3)) return AssertionSuccess();
189
190 return AssertionFailure()
191 << pred_text << "(" << e1 << ", " << e2 << ", " << e3
192 << ") evaluates to false, where"
193 << "\n"
194 << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
195 << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
196 << e3 << " evaluates to " << ::testing::PrintToString(v3);
197}

◆ AssertPred4Helper()

template<typename Pred , typename T1 , typename T2 , typename T3 , typename T4 >
AssertionResult testing::AssertPred4Helper ( const char *  pred_text,
const char *  e1,
const char *  e2,
const char *  e3,
const char *  e4,
Pred  pred,
const T1 v1,
const T2 v2,
const T3 v3,
const T4 v4 
)

Definition at line 236 of file gtest_pred_impl.h.

245 {
246 if (pred(v1, v2, v3, v4)) return AssertionSuccess();
247
248 return AssertionFailure()
249 << pred_text << "(" << e1 << ", " << e2 << ", " << e3 << ", " << e4
250 << ") evaluates to false, where"
251 << "\n"
252 << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
253 << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
254 << e3 << " evaluates to " << ::testing::PrintToString(v3) << "\n"
255 << e4 << " evaluates to " << ::testing::PrintToString(v4);
256}

◆ AssertPred5Helper()

template<typename Pred , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
AssertionResult testing::AssertPred5Helper ( const char *  pred_text,
const char *  e1,
const char *  e2,
const char *  e3,
const char *  e4,
const char *  e5,
Pred  pred,
const T1 v1,
const T2 v2,
const T3 v3,
const T4 v4,
const T5 v5 
)

Definition at line 298 of file gtest_pred_impl.h.

309 {
310 if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();
311
312 return AssertionFailure()
313 << pred_text << "(" << e1 << ", " << e2 << ", " << e3 << ", " << e4
314 << ", " << e5 << ") evaluates to false, where"
315 << "\n"
316 << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
317 << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
318 << e3 << " evaluates to " << ::testing::PrintToString(v3) << "\n"
319 << e4 << " evaluates to " << ::testing::PrintToString(v4) << "\n"
320 << e5 << " evaluates to " << ::testing::PrintToString(v5);
321}

◆ Assign()

template<typename T1 , typename T2 >
PolymorphicAction< internal::AssignAction< T1, T2 > > testing::Assign ( T1 ptr,
T2  val 
)

Definition at line 1322 of file gmock-actions.h.

1322 {
1324}
PolymorphicAction< Impl > MakePolymorphicAction(const Impl &impl)

◆ AtLeast()

GTEST_API_ Cardinality testing::AtLeast ( int  n)

Definition at line 139 of file gmock-cardinalities.cc.

139{ return Between(n, INT_MAX); }
GTEST_API_ Cardinality Between(int min, int max)

◆ AtMost()

GTEST_API_ Cardinality testing::AtMost ( int  n)

Definition at line 142 of file gmock-cardinalities.cc.

142{ return Between(0, n); }

◆ Between()

GTEST_API_ Cardinality testing::Between ( int  min,
int  max 
)

Definition at line 148 of file gmock-cardinalities.cc.

148 {
149 return Cardinality(new BetweenCardinalityImpl(min, max));
150}

◆ Bool()

internal::ParamGenerator< bool > testing::Bool ( )
inline

Definition at line 356 of file gtest-param-test.h.

356 {
357 return Values(false, true);
358}
internal::ValueArray< T... > Values(T... v)

◆ ByMove()

template<typename R >
internal::ByMoveWrapper< R > testing::ByMove ( x)

Definition at line 1281 of file gmock-actions.h.

1281 {
1282 return internal::ByMoveWrapper<R>(std::move(x));
1283}

◆ ByRef()

template<typename T >
inline ::std::reference_wrapper< T > testing::ByRef ( T &  l_value)

Definition at line 1391 of file gmock-actions.h.

1391 { // NOLINT
1392 return ::std::reference_wrapper<T>(l_value);
1393}

◆ Combine()

template<typename... Generator>
internal::CartesianProductHolder< Generator... > testing::Combine ( const Generator &...  g)

Definition at line 405 of file gtest-param-test.h.

◆ DeleteArg()

template<size_t k>
internal::DeleteArgAction< k > testing::DeleteArg ( )

Definition at line 1446 of file gmock-actions.h.

1446 {
1447 return {};
1448}

◆ DoAll()

template<typename... Action>
internal::DoAllAction< typename std::decay< Action >::type... > testing::DoAll ( Action &&...  action)

Definition at line 1204 of file gmock-actions.h.

1205 {
1206 return {std::forward_as_tuple(std::forward<Action>(action)...)};
1207}
action
Definition: upload.py:408

◆ DoDefault()

internal::DoDefaultAction testing::DoDefault ( )
inline

Definition at line 1303 of file gmock-actions.h.

◆ DoubleLE()

AssertionResult testing::DoubleLE ( const char *  expr1,
const char *  expr2,
double  val1,
double  val2 
)

Definition at line 1652 of file gtest.cc.

1653 {
1654 return internal::FloatingPointLE<double>(expr1, expr2, val1, val2);
1655}

◆ Exactly()

GTEST_API_ Cardinality testing::Exactly ( int  n)

Definition at line 153 of file gmock-cardinalities.cc.

153{ return Between(n, n); }

◆ FloatLE()

AssertionResult testing::FloatLE ( const char *  expr1,
const char *  expr2,
float  val1,
float  val2 
)

Definition at line 1645 of file gtest.cc.

1646 {
1647 return internal::FloatingPointLE<float>(expr1, expr2, val1, val2);
1648}

◆ GMOCK_DECLARE_bool_()

testing::GMOCK_DECLARE_bool_ ( catch_leaked_mocks  )

◆ GMOCK_DECLARE_int32_()

testing::GMOCK_DECLARE_int32_ ( default_mock_behavior  )

◆ GMOCK_DECLARE_string_()

testing::GMOCK_DECLARE_string_ ( verbose  )

◆ GMOCK_DEFINE_bool_()

testing::GMOCK_DEFINE_bool_ ( catch_leaked_mocks  ,
true  ,
"true if and only if Google Mock should report leaked " "mock objects as failures."   
)

◆ GMOCK_DEFINE_int32_()

testing::GMOCK_DEFINE_int32_ ( default_mock_behavior  ,
,
"Controls the default behavior of mocks." " Valid values:\n" " 0 - by  default,
mocks act as NiceMocks.\n" " 1 - by  default,
mocks act as NaggyMocks.\n" " 2 - by  default,
mocks act as StrictMocks."   
)

◆ GMOCK_DEFINE_string_()

testing::GMOCK_DEFINE_string_ ( verbose  ,
internal::kWarningVerbosity  ,
"Controls how verbose Google Mock's output is." " Valid values:\n" " info - prints all messages.\n" " warning - prints warnings and errors.\n" " error - prints errors only."   
)

◆ GTEST_DECLARE_int32_()

testing::GTEST_DECLARE_int32_ ( repeat  )

◆ GTEST_DECLARE_string_() [1/2]

testing::GTEST_DECLARE_string_ ( death_test_style  )

◆ GTEST_DECLARE_string_() [2/2]

testing::GTEST_DECLARE_string_ ( filter  )

◆ GTEST_DEFINE_bool_() [1/13]

testing::GTEST_DEFINE_bool_ ( also_run_disabled_tests  ,
internal::BoolFromGTestEnv("also_run_disabled_tests", false)  ,
"Run disabled tests  too,
in addition to the tests normally being run."   
)

◆ GTEST_DEFINE_bool_() [2/13]

testing::GTEST_DEFINE_bool_ ( break_on_failure  ,
internal::BoolFromGTestEnv("break_on_failure", false)  ,
"True if and only if a failed assertion should be a debugger " "break-point."   
)

◆ GTEST_DEFINE_bool_() [3/13]

testing::GTEST_DEFINE_bool_ ( brief  ,
internal::BoolFromGTestEnv("brief", false)  ,
"True if only test failures should be displayed in text output."   
)

◆ GTEST_DEFINE_bool_() [4/13]

testing::GTEST_DEFINE_bool_ ( catch_exceptions  ,
internal::BoolFromGTestEnv("catch_exceptions", true)  ,
"True if and only if " GTEST_NAME_ " should catch exceptions and treat them as test failures."   
)

◆ GTEST_DEFINE_bool_() [5/13]

testing::GTEST_DEFINE_bool_ ( death_test_use_fork  ,
internal::BoolFromGTestEnv("death_test_use_fork", false)  ,
"Instructs to use fork()/_exit() instead of clone() in death tests. " "Ignored and always uses fork() on POSIX systems where clone() is not " "implemented. Useful when running under valgrind or similar tools if " "those do not support clone(). Valgrind 3.3.1 will just fail if " "it sees an unsupported combination of clone() flags. " "It is not recommended to use this flag w/o valgrind though it will " "work in 99% of the cases. Once valgrind is  fixed,
this flag will " "most likely be removed."   
)

◆ GTEST_DEFINE_bool_() [6/13]

testing::GTEST_DEFINE_bool_ ( fail_fast  ,
internal::BoolFromGTestEnv("fail_fast", GetDefaultFailFast())  ,
"True if and only if a test failure should stop further test execution."   
)

◆ GTEST_DEFINE_bool_() [7/13]

testing::GTEST_DEFINE_bool_ ( install_failure_signal_handler  ,
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_() [8/13]

testing::GTEST_DEFINE_bool_ ( list_tests  ,
false  ,
"List all tests without running them."   
)

◆ GTEST_DEFINE_bool_() [9/13]

testing::GTEST_DEFINE_bool_ ( print_time  ,
internal::BoolFromGTestEnv("print_time", true)  ,
"True if and only if " GTEST_NAME_ " should display elapsed time in text output."   
)

◆ GTEST_DEFINE_bool_() [10/13]

testing::GTEST_DEFINE_bool_ ( print_utf8  ,
internal::BoolFromGTestEnv("print_utf8", true)  ,
"True if and only if " GTEST_NAME_ " prints UTF8 characters as text."   
)

◆ GTEST_DEFINE_bool_() [11/13]

testing::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_() [12/13]

testing::GTEST_DEFINE_bool_ ( shuffle  ,
internal::BoolFromGTestEnv("shuffle", false)  ,
"True if and only if " GTEST_NAME_ " should randomize tests' order on every run."   
)

◆ GTEST_DEFINE_bool_() [13/13]

testing::GTEST_DEFINE_bool_ ( throw_on_failure  ,
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."   
)

◆ GTEST_DEFINE_int32_() [1/3]

testing::GTEST_DEFINE_int32_ ( random_seed  ,
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_() [2/3]

testing::GTEST_DEFINE_int32_ ( repeat  ,
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_int32_() [3/3]

testing::GTEST_DEFINE_int32_ ( stack_trace_depth  ,
internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth)  ,
"The maximum number of stack frames to print when an " "assertion fails. The valid range is 0 through  100,
inclusive."   
)

◆ GTEST_DEFINE_string_() [1/5]

testing::GTEST_DEFINE_string_ ( color  ,
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_() [2/5]

testing::GTEST_DEFINE_string_ ( death_test_style  ,
internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle)  ,
"Indicates how to run a death test in a forked child process: " "\"threadsafe\" (child process re-executes the test binary " "from the beginning, running only the specific death test) or " "\"fast\" (child process runs the death test immediately " "after forking)."   
)

◆ GTEST_DEFINE_string_() [3/5]

testing::GTEST_DEFINE_string_ ( filter  ,
internal::StringFromGTestEnv("filter", 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_string_() [4/5]

testing::GTEST_DEFINE_string_ ( output  ,
internal::StringFromGTestEnv("output", 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_string_() [5/5]

testing::GTEST_DEFINE_string_ ( stream_result_to  ,
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."   
)

◆ IgnoreResult()

template<typename A >
internal::IgnoreResultAction< A > testing::IgnoreResult ( const A &  an_action)
inline

Definition at line 1376 of file gmock-actions.h.

◆ InitGoogleMock() [1/3]

GTEST_API_ void testing::InitGoogleMock ( )

Definition at line 203 of file gmock.cc.

203 {
204 // Since Arduino doesn't have a command line, fake out the argc/argv arguments
205 int argc = 1;
206 const auto arg0 = "dummy";
207 char* argv0 = const_cast<char*>(arg0);
208 char** argv = &argv0;
209
210 internal::InitGoogleMockImpl(&argc, argv);
211}
void InitGoogleMockImpl(int *argc, CharType **argv)
Definition: gmock.cc:144

◆ InitGoogleMock() [2/3]

GTEST_API_ void testing::InitGoogleMock ( int *  argc,
char **  argv 
)

Definition at line 191 of file gmock.cc.

191 {
193}

◆ InitGoogleMock() [3/3]

GTEST_API_ void testing::InitGoogleMock ( int *  argc,
wchar_t **  argv 
)

Definition at line 197 of file gmock.cc.

197 {
199}

◆ InitGoogleTest() [1/3]

void testing::InitGoogleTest ( )

Definition at line 6680 of file gtest.cc.

6680 {
6681 // Since Arduino doesn't have a command line, fake out the argc/argv arguments
6682 int argc = 1;
6683 const auto arg0 = "dummy";
6684 char* argv0 = const_cast<char*>(arg0);
6685 char** argv = &argv0;
6686
6687#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6688 GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(&argc, argv);
6689#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6690 internal::InitGoogleTestImpl(&argc, argv);
6691#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6692}
void InitGoogleTestImpl(int *argc, CharType **argv)
Definition: gtest.cc:6630

◆ InitGoogleTest() [2/3]

void testing::InitGoogleTest ( int *  argc,
char **  argv 
)

Definition at line 6660 of file gtest.cc.

6660 {
6661#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6662 GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv);
6663#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6664 internal::InitGoogleTestImpl(argc, argv);
6665#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6666}

◆ InitGoogleTest() [3/3]

void testing::InitGoogleTest ( int *  argc,
wchar_t **  argv 
)

Definition at line 6670 of file gtest.cc.

6670 {
6671#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6672 GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv);
6673#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6674 internal::InitGoogleTestImpl(argc, argv);
6675#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
6676}

◆ INSTANTIATE_TEST_SUITE_P()

testing::INSTANTIATE_TEST_SUITE_P ( CodeLocationForTESTP  ,
Values(0)   
)

◆ INSTANTIATE_TYPED_TEST_SUITE_P()

testing::INSTANTIATE_TYPED_TEST_SUITE_P ( My  ,
CodeLocationForTYPEDTESTP  ,
int   
)

◆ Invoke() [1/2]

template<class Class , typename MethodPtr >
internal::InvokeMethodAction< Class, MethodPtr > testing::Invoke ( Class *  obj_ptr,
MethodPtr  method_ptr 
)

Definition at line 1352 of file gmock-actions.h.

1353 {
1354 return {obj_ptr, method_ptr};
1355}

◆ Invoke() [2/2]

template<typename FunctionImpl >
std::decay< FunctionImpl >::type testing::Invoke ( FunctionImpl &&  function_impl)

Definition at line 1345 of file gmock-actions.h.

1345 {
1346 return std::forward<FunctionImpl>(function_impl);
1347}

◆ InvokeArgument()

template<std::size_t index, typename... Params>
internal::InvokeArgumentAction< index, typename std::decay< Params >::type... > testing::InvokeArgument ( Params &&...  params)

◆ InvokeWithoutArgs() [1/2]

template<class Class , typename MethodPtr >
internal::InvokeMethodWithoutArgsAction< Class, MethodPtr > testing::InvokeWithoutArgs ( Class *  obj_ptr,
MethodPtr  method_ptr 
)

Definition at line 1367 of file gmock-actions.h.

1368 {
1369 return {obj_ptr, method_ptr};
1370}

◆ InvokeWithoutArgs() [2/2]

template<typename FunctionImpl >
internal::InvokeWithoutArgsAction< typename std::decay< FunctionImpl >::type > testing::InvokeWithoutArgs ( FunctionImpl  function_impl)

Definition at line 1360 of file gmock-actions.h.

1360 {
1361 return {std::move(function_impl)};
1362}

◆ IsNotSubstring() [1/3]

AssertionResult testing::IsNotSubstring ( const char *  needle_expr,
const char *  haystack_expr,
const ::std::string &  needle,
const ::std::string &  haystack 
)

Definition at line 1807 of file gtest.cc.

1809 {
1810 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1811}

◆ IsNotSubstring() [2/3]

AssertionResult testing::IsNotSubstring ( const char *  needle_expr,
const char *  haystack_expr,
const char *  needle,
const char *  haystack 
)

Definition at line 1789 of file gtest.cc.

1791 {
1792 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1793}

◆ IsNotSubstring() [3/3]

AssertionResult testing::IsNotSubstring ( const char *  needle_expr,
const char *  haystack_expr,
const wchar_t *  needle,
const wchar_t *  haystack 
)

Definition at line 1795 of file gtest.cc.

1797 {
1798 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1799}

◆ IsSubstring() [1/3]

AssertionResult testing::IsSubstring ( const char *  needle_expr,
const char *  haystack_expr,
const ::std::string &  needle,
const ::std::string &  haystack 
)

Definition at line 1801 of file gtest.cc.

1803 {
1804 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1805}

◆ IsSubstring() [2/3]

AssertionResult testing::IsSubstring ( const char *  needle_expr,
const char *  haystack_expr,
const char *  needle,
const char *  haystack 
)

Definition at line 1777 of file gtest.cc.

1779 {
1780 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1781}

◆ IsSubstring() [3/3]

AssertionResult testing::IsSubstring ( const char *  needle_expr,
const char *  haystack_expr,
const wchar_t *  needle,
const wchar_t *  haystack 
)

Definition at line 1783 of file gtest.cc.

1785 {
1786 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1787}

◆ MakeAction()

template<typename F >
Action< F > testing::MakeAction ( ActionInterface< F > *  impl)

Definition at line 583 of file gmock-actions.h.

583 {
584 return Action<F>(impl);
585}

◆ MakePolymorphicAction()

template<typename Impl >
PolymorphicAction< Impl > testing::MakePolymorphicAction ( const Impl &  impl)
inline

Definition at line 595 of file gmock-actions.h.

◆ MATCHER() [1/3]

testing::MATCHER ( IsEmpty  ,
negation ? "isn't empty" :"is empty"   
)

Definition at line 61 of file gmock-more-matchers.h.

61 : "is empty") {
62 if (arg.empty()) {
63 return true;
64 }
65 *result_listener << "whose size is " << arg.size();
66 return false;
67}

◆ MATCHER() [2/3]

testing::MATCHER ( IsFalse  ,
negation ? "is true" :"is false"   
)

Definition at line 81 of file gmock-more-matchers.h.

81 : "is false") {
82 return !static_cast<bool>(arg);
83}

◆ MATCHER() [3/3]

testing::MATCHER ( IsTrue  ,
negation ? "is false" :"is true"   
)

Definition at line 73 of file gmock-more-matchers.h.

73 : "is true") {
74 return static_cast<bool>(arg);
75}

◆ operator<<() [1/2]

std::ostream & testing::operator<< ( std::ostream &  os,
const Message sb 
)
inline

Definition at line 199 of file gtest-message.h.

199 {
200 return os << sb.GetString();
201}
std::string GetString() const
Definition: gtest.cc:1182

◆ operator<<() [2/2]

std::ostream & testing::operator<< ( std::ostream &  os,
const TestPartResult &  result 
)

Definition at line 50 of file gtest-test-part.cc.

50 {
51 return os << internal::FormatFileLocation(result.file_name(),
52 result.line_number())
53 << " "
54 << (result.type() == TestPartResult::kSuccess
55 ? "Success"
56 : result.type() == TestPartResult::kSkip
57 ? "Skipped"
58 : result.type() == TestPartResult::kFatalFailure
59 ? "Fatal failure"
60 : "Non-fatal failure")
61 << ":\n"
62 << result.message() << std::endl;
63}
GTEST_API_::std::string FormatFileLocation(const char *file, int line)
Definition: gtest-port.cc:1023

◆ PrintFlag()

void testing::PrintFlag ( const char *  flag)

Definition at line 49 of file googletest-env-var-test_.cc.

49 {
50 if (strcmp(flag, "break_on_failure") == 0) {
51 cout << GTEST_FLAG(break_on_failure);
52 return;
53 }
54
55 if (strcmp(flag, "catch_exceptions") == 0) {
56 cout << GTEST_FLAG(catch_exceptions);
57 return;
58 }
59
60 if (strcmp(flag, "color") == 0) {
61 cout << GTEST_FLAG(color);
62 return;
63 }
64
65 if (strcmp(flag, "death_test_style") == 0) {
66 cout << GTEST_FLAG(death_test_style);
67 return;
68 }
69
70 if (strcmp(flag, "death_test_use_fork") == 0) {
71 cout << GTEST_FLAG(death_test_use_fork);
72 return;
73 }
74
75 if (strcmp(flag, "fail_fast") == 0) {
76 cout << GTEST_FLAG(fail_fast);
77 return;
78 }
79
80 if (strcmp(flag, "filter") == 0) {
81 cout << GTEST_FLAG(filter);
82 return;
83 }
84
85 if (strcmp(flag, "output") == 0) {
86 cout << GTEST_FLAG(output);
87 return;
88 }
89
90 if (strcmp(flag, "brief") == 0) {
91 cout << GTEST_FLAG(brief);
92 return;
93 }
94
95 if (strcmp(flag, "print_time") == 0) {
96 cout << GTEST_FLAG(print_time);
97 return;
98 }
99
100 if (strcmp(flag, "repeat") == 0) {
101 cout << GTEST_FLAG(repeat);
102 return;
103 }
104
105 if (strcmp(flag, "stack_trace_depth") == 0) {
106 cout << GTEST_FLAG(stack_trace_depth);
107 return;
108 }
109
110 if (strcmp(flag, "throw_on_failure") == 0) {
111 cout << GTEST_FLAG(throw_on_failure);
112 return;
113 }
114
115 cout << "Invalid flag name " << flag
116 << ". Valid names are break_on_failure, color, filter, etc.\n";
117 exit(1);
118}
#define GTEST_FLAG(name)
Definition: gtest-port.h:2205

◆ PrintToString()

template<typename T >
::std::string testing::PrintToString ( const T &  value)

Definition at line 1016 of file gtest-printers.h.

1016 {
1017 ::std::stringstream ss;
1019 return ss.str();
1020}
int value
std::string Print(const T &value)

◆ Range() [1/2]

template<typename T >
internal::ParamGenerator< T > testing::Range ( start,
end 
)

Definition at line 232 of file gtest-param-test.h.

232 {
233 return Range(start, end, 1);
234}
internal::ParamGenerator< T > Range(T start, T end)

◆ Range() [2/2]

template<typename T , typename IncrementT >
internal::ParamGenerator< T > testing::Range ( start,
end,
IncrementT  step 
)

◆ REGISTER_TYPED_TEST_SUITE_P()

testing::REGISTER_TYPED_TEST_SUITE_P ( CodeLocationForTYPEDTESTP  ,
Verify   
)

◆ RegisterTest()

template<int &... ExplicitParameterBarrier, typename Factory >
TestInfo * testing::RegisterTest ( const char *  test_suite_name,
const char *  test_name,
const char *  type_param,
const char *  value_param,
const char *  file,
int  line,
Factory  factory 
)

Definition at line 2455 of file gtest.h.

2457 {
2458 using TestT = typename std::remove_pointer<decltype(factory())>::type;
2459
2460 class FactoryImpl : public internal::TestFactoryBase {
2461 public:
2462 explicit FactoryImpl(Factory f) : factory_(std::move(f)) {}
2463 Test* CreateTest() override { return factory_(); }
2464
2465 private:
2466 Factory factory_;
2467 };
2468
2470 test_suite_name, test_name, type_param, value_param,
2471 internal::CodeLocation(file, line), internal::GetTypeId<TestT>(),
2472 internal::SuiteApiResolver<TestT>::GetSetUpCaseOrSuite(file, line),
2473 internal::SuiteApiResolver<TestT>::GetTearDownCaseOrSuite(file, line),
2474 new FactoryImpl{std::move(factory)});
2475}
STL namespace.
GTEST_API_ TestInfo * MakeAndRegisterTestInfo(const char *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)
Definition: gtest.cc:2756
type
Definition: upload.py:458

◆ Return() [1/2]

◆ Return() [2/2]

template<typename R >
internal::ReturnAction< R > testing::Return ( value)

Definition at line 1244 of file gmock-actions.h.

1244 {
1245 return internal::ReturnAction<R>(std::move(value));
1246}

◆ ReturnArg()

template<size_t k>
internal::ReturnArgAction< k > testing::ReturnArg ( )

Definition at line 1406 of file gmock-actions.h.

1406 {
1407 return {};
1408}

◆ ReturnNew()

template<typename T , typename... Params>
internal::ReturnNewAction< T, typename std::decay< Params >::type... > testing::ReturnNew ( Params &&...  params)

Definition at line 1399 of file gmock-actions.h.

1400 {
1401 return {std::forward_as_tuple(std::forward<Params>(params)...)};
1402}

◆ ReturnNull()

PolymorphicAction< internal::ReturnNullAction > testing::ReturnNull ( )
inline

◆ ReturnPointee()

template<typename Ptr >
internal::ReturnPointeeAction< Ptr > testing::ReturnPointee ( Ptr  pointer)

Definition at line 1452 of file gmock-actions.h.

1452 {
1453 return {pointer};
1454}

◆ ReturnRef() [1/2]

template<typename R , R * = nullptr>
internal::ReturnRefAction< R > testing::ReturnRef ( R &&  )
delete

◆ ReturnRef() [2/2]

template<typename R >
internal::ReturnRefAction< R > testing::ReturnRef ( R &  x)
inline

Definition at line 1260 of file gmock-actions.h.

◆ ReturnRefOfCopy()

template<typename R >
internal::ReturnRefOfCopyAction< R > testing::ReturnRefOfCopy ( const R &  x)
inline

◆ ReturnRoundRobin() [1/2]

template<typename T >
internal::ReturnRoundRobinAction< T > testing::ReturnRoundRobin ( std::initializer_list< T >  vals)

Definition at line 1297 of file gmock-actions.h.

◆ ReturnRoundRobin() [2/2]

template<typename T >
internal::ReturnRoundRobinAction< T > testing::ReturnRoundRobin ( std::vector< T >  vals)

Definition at line 1289 of file gmock-actions.h.

1289 {
1290 return internal::ReturnRoundRobinAction<T>(std::move(vals));
1291}

◆ SaveArg()

template<size_t k, typename Ptr >
internal::SaveArgAction< k, Ptr > testing::SaveArg ( Ptr  pointer)

Definition at line 1413 of file gmock-actions.h.

1413 {
1414 return {pointer};
1415}

◆ SaveArgPointee()

template<size_t k, typename Ptr >
internal::SaveArgPointeeAction< k, Ptr > testing::SaveArgPointee ( Ptr  pointer)

Definition at line 1420 of file gmock-actions.h.

1420 {
1421 return {pointer};
1422}

◆ SetArgPointee()

template<size_t N, typename T >
internal::SetArgumentPointeeAction< N, T > testing::SetArgPointee ( value)

Definition at line 1310 of file gmock-actions.h.

1310 {
1311 return {std::move(value)};
1312}

◆ SetArgReferee()

template<size_t k, typename T >
internal::SetArgRefereeAction< k, typename std::decay< T >::type > testing::SetArgReferee ( T &&  value)

Definition at line 1427 of file gmock-actions.h.

1428 {
1429 return {std::forward<T>(value)};
1430}

◆ SetArgumentPointee()

template<size_t N, typename T >
internal::SetArgumentPointeeAction< N, T > testing::SetArgumentPointee ( value)

Definition at line 1316 of file gmock-actions.h.

1316 {
1317 return {std::move(value)};
1318}

◆ SetArrayArgument()

template<size_t k, typename I1 , typename I2 >
internal::SetArrayArgumentAction< k, I1, I2 > testing::SetArrayArgument ( I1  first,
I2  last 
)

Definition at line 1438 of file gmock-actions.h.

1439 {
1440 return {first, last};
1441}
LIST last(LIST var_list)
Definition: oldlist.cpp:153

◆ SetErrnoAndReturn()

template<typename T >
PolymorphicAction< internal::SetErrnoAndReturnAction< T > > testing::SetErrnoAndReturn ( int  errval,
result 
)

Definition at line 1331 of file gmock-actions.h.

◆ StaticAssertTypeEq()

template<typename T1 , typename T2 >
constexpr bool testing::StaticAssertTypeEq ( )
constexprnoexcept

Definition at line 2316 of file gtest.h.

2316 {
2317 static_assert(std::is_same<T1, T2>::value, "T1 and T2 are not the same type");
2318 return true;
2319}

◆ TempDir()

std::string testing::TempDir ( )

Definition at line 6694 of file gtest.cc.

6694 {
6695#if defined(GTEST_CUSTOM_TEMPDIR_FUNCTION_)
6696 return GTEST_CUSTOM_TEMPDIR_FUNCTION_();
6697#elif GTEST_OS_WINDOWS_MOBILE
6698 return "\\temp\\";
6699#elif GTEST_OS_WINDOWS
6700 const char* temp_dir = internal::posix::GetEnv("TEMP");
6701 if (temp_dir == nullptr || temp_dir[0] == '\0') {
6702 return "\\temp\\";
6703 } else if (temp_dir[strlen(temp_dir) - 1] == '\\') {
6704 return temp_dir;
6705 } else {
6706 return std::string(temp_dir) + "\\";
6707 }
6708#elif GTEST_OS_LINUX_ANDROID
6709 const char* temp_dir = internal::posix::GetEnv("TEST_TMPDIR");
6710 if (temp_dir == nullptr || temp_dir[0] == '\0') {
6711 return "/data/local/tmp/";
6712 } else {
6713 return temp_dir;
6714 }
6715#elif GTEST_OS_LINUX
6716 const char* temp_dir = internal::posix::GetEnv("TEST_TMPDIR");
6717 if (temp_dir == nullptr || temp_dir[0] == '\0') {
6718 return "/tmp/";
6719 } else {
6720 return temp_dir;
6721 }
6722#else
6723 return "/tmp/";
6724#endif // GTEST_OS_WINDOWS_MOBILE
6725}
const char * GetEnv(const char *name)
Definition: gtest-port.h:2103

◆ TEST() [1/7]

testing::TEST ( CodeLocationForTEST  ,
Verify   
)

Definition at line 5394 of file gtest_unittest.cc.

5394 {
5396}
#define VERIFY_CODE_LOCATION

◆ TEST() [2/7]

testing::TEST ( GTestEnvVarTest  ,
Dummy   
)

Definition at line 46 of file googletest-env-var-test_.cc.

46 {
47}

◆ TEST() [3/7]

testing::TEST ( SuccessfulAssertionTest  ,
ASSERT   
)

Definition at line 4316 of file gtest_unittest.cc.

4316 {
4317 ASSERT_TRUE(true);
4318 EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
4319}
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:2043
#define ASSERT_TRUE(condition)
Definition: gtest.h:1990

◆ TEST() [4/7]

testing::TEST ( SuccessfulAssertionTest  ,
ASSERT_STR   
)

Definition at line 4322 of file gtest_unittest.cc.

4322 {
4323 ASSERT_STREQ("", "");
4324 EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
4325}
#define ASSERT_STREQ(s1, s2)
Definition: gtest.h:2121

◆ TEST() [5/7]

testing::TEST ( SuccessfulAssertionTest  ,
EXPECT   
)

Definition at line 4304 of file gtest_unittest.cc.

4304 {
4305 EXPECT_TRUE(true);
4306 EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
4307}
#define EXPECT_TRUE(condition)
Definition: gtest.h:1982

◆ TEST() [6/7]

testing::TEST ( SuccessfulAssertionTest  ,
EXPECT_STR   
)

Definition at line 4310 of file gtest_unittest.cc.

4310 {
4311 EXPECT_STREQ("", "");
4312 EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count());
4313}
#define EXPECT_STREQ(s1, s2)
Definition: gtest.h:2112

◆ TEST() [7/7]

testing::TEST ( SuccessfulAssertionTest  ,
SUCCEED   
)

Definition at line 4297 of file gtest_unittest.cc.

4297 {
4298 SUCCEED();
4299 SUCCEED() << "OK";
4300 EXPECT_EQ(2, GetUnitTestImpl()->current_test_result()->total_part_count());
4301}
#define SUCCEED()
Definition: gtest.h:1937

◆ TEST_F() [1/54]

testing::TEST_F ( CodeLocationForTESTF  ,
Verify   
)

Definition at line 5401 of file gtest_unittest.cc.

5401 {
5403}

◆ TEST_F() [2/54]

testing::TEST_F ( CurrentTestInfoTest  ,
WorksForFirstTestInATestSuite   
)

Definition at line 6402 of file gtest_unittest.cc.

6402 {
6403 const TestInfo* test_info =
6404 UnitTest::GetInstance()->current_test_info();
6405 ASSERT_TRUE(nullptr != test_info)
6406 << "There is a test running so we should have a valid TestInfo.";
6407 EXPECT_STREQ("CurrentTestInfoTest", test_info->test_suite_name())
6408 << "Expected the name of the currently running test suite.";
6409 EXPECT_STREQ("WorksForFirstTestInATestSuite", test_info->name())
6410 << "Expected the name of the currently running test.";
6411}
const char * name() const
Definition: gtest.h:719
const char * test_suite_name() const
Definition: gtest.h:711

◆ TEST_F() [3/54]

testing::TEST_F ( CurrentTestInfoTest  ,
WorksForSecondTestInATestSuite   
)

Definition at line 6417 of file gtest_unittest.cc.

6417 {
6418 const TestInfo* test_info =
6419 UnitTest::GetInstance()->current_test_info();
6420 ASSERT_TRUE(nullptr != test_info)
6421 << "There is a test running so we should have a valid TestInfo.";
6422 EXPECT_STREQ("CurrentTestInfoTest", test_info->test_suite_name())
6423 << "Expected the name of the currently running test suite.";
6424 EXPECT_STREQ("WorksForSecondTestInATestSuite", test_info->name())
6425 << "Expected the name of the currently running test.";
6426}

◆ TEST_F() [4/54]

testing::TEST_F ( ParseFlagsTest  ,
AlsoRunDisabledTestsFalse   
)

Definition at line 6186 of file gtest_unittest.cc.

6186 {
6187 const char* argv[] = {"foo.exe", "--gtest_also_run_disabled_tests=0",
6188 nullptr};
6189
6190 const char* argv2[] = {"foo.exe", nullptr};
6191
6192 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(false),
6193 false);
6194}
#define GTEST_TEST_PARSING_FLAGS_(argv1, argv2, expected, should_print_help)

◆ TEST_F() [5/54]

testing::TEST_F ( ParseFlagsTest  ,
AlsoRunDisabledTestsFlag   
)

Definition at line 6165 of file gtest_unittest.cc.

6165 {
6166 const char* argv[] = {"foo.exe", "--gtest_also_run_disabled_tests", nullptr};
6167
6168 const char* argv2[] = {"foo.exe", nullptr};
6169
6170 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(true),
6171 false);
6172}

◆ TEST_F() [6/54]

testing::TEST_F ( ParseFlagsTest  ,
AlsoRunDisabledTestsTrue   
)

Definition at line 6175 of file gtest_unittest.cc.

6175 {
6176 const char* argv[] = {"foo.exe", "--gtest_also_run_disabled_tests=1",
6177 nullptr};
6178
6179 const char* argv2[] = {"foo.exe", nullptr};
6180
6181 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(true),
6182 false);
6183}

◆ TEST_F() [7/54]

testing::TEST_F ( ParseFlagsTest  ,
BreakOnFailureFalse_0   
)

Definition at line 5912 of file gtest_unittest.cc.

5912 {
5913 const char* argv[] = {"foo.exe", "--gtest_break_on_failure=0", nullptr};
5914
5915 const char* argv2[] = {"foo.exe", nullptr};
5916
5917 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false), false);
5918}

◆ TEST_F() [8/54]

testing::TEST_F ( ParseFlagsTest  ,
BreakOnFailureFalse_f   
)

Definition at line 5921 of file gtest_unittest.cc.

5921 {
5922 const char* argv[] = {"foo.exe", "--gtest_break_on_failure=f", nullptr};
5923
5924 const char* argv2[] = {"foo.exe", nullptr};
5925
5926 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false), false);
5927}

◆ TEST_F() [9/54]

testing::TEST_F ( ParseFlagsTest  ,
BreakOnFailureFalse_F   
)

Definition at line 5930 of file gtest_unittest.cc.

5930 {
5931 const char* argv[] = {"foo.exe", "--gtest_break_on_failure=F", nullptr};
5932
5933 const char* argv2[] = {"foo.exe", nullptr};
5934
5935 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false), false);
5936}

◆ TEST_F() [10/54]

testing::TEST_F ( ParseFlagsTest  ,
BreakOnFailureTrue   
)

Definition at line 5940 of file gtest_unittest.cc.

5940 {
5941 const char* argv[] = {"foo.exe", "--gtest_break_on_failure=1", nullptr};
5942
5943 const char* argv2[] = {"foo.exe", nullptr};
5944
5945 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(true), false);
5946}

◆ TEST_F() [11/54]

testing::TEST_F ( ParseFlagsTest  ,
BreakOnFailureWithoutValue   
)

Definition at line 5903 of file gtest_unittest.cc.

5903 {
5904 const char* argv[] = {"foo.exe", "--gtest_break_on_failure", nullptr};
5905
5906 const char* argv2[] = {"foo.exe", nullptr};
5907
5908 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(true), false);
5909}

◆ TEST_F() [12/54]

testing::TEST_F ( ParseFlagsTest  ,
BriefFlag   
)

Definition at line 6075 of file gtest_unittest.cc.

6075 {
6076 const char* argv[] = {"foo.exe", "--gtest_brief", nullptr};
6077
6078 const char* argv2[] = {"foo.exe", nullptr};
6079
6080 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Brief(true), false);
6081}

◆ TEST_F() [13/54]

testing::TEST_F ( ParseFlagsTest  ,
BriefFlagFalse   
)

Definition at line 6093 of file gtest_unittest.cc.

6093 {
6094 const char* argv[] = {"foo.exe", "--gtest_brief=0", nullptr};
6095
6096 const char* argv2[] = {"foo.exe", nullptr};
6097
6098 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Brief(false), false);
6099}

◆ TEST_F() [14/54]

testing::TEST_F ( ParseFlagsTest  ,
BriefFlagTrue   
)

Definition at line 6084 of file gtest_unittest.cc.

6084 {
6085 const char* argv[] = {"foo.exe", "--gtest_brief=1", nullptr};
6086
6087 const char* argv2[] = {"foo.exe", nullptr};
6088
6089 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Brief(true), false);
6090}

◆ TEST_F() [15/54]

testing::TEST_F ( ParseFlagsTest  ,
CatchExceptions   
)

Definition at line 5949 of file gtest_unittest.cc.

5949 {
5950 const char* argv[] = {"foo.exe", "--gtest_catch_exceptions", nullptr};
5951
5952 const char* argv2[] = {"foo.exe", nullptr};
5953
5954 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::CatchExceptions(true), false);
5955}

◆ TEST_F() [16/54]

testing::TEST_F ( ParseFlagsTest  ,
DeathTestUseFork   
)

Definition at line 5958 of file gtest_unittest.cc.

5958 {
5959 const char* argv[] = {"foo.exe", "--gtest_death_test_use_fork", nullptr};
5960
5961 const char* argv2[] = {"foo.exe", nullptr};
5962
5963 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::DeathTestUseFork(true), false);
5964}

◆ TEST_F() [17/54]

testing::TEST_F ( ParseFlagsTest  ,
DuplicatedFlags   
)

Definition at line 5968 of file gtest_unittest.cc.

5968 {
5969 const char* argv[] = {"foo.exe", "--gtest_filter=a", "--gtest_filter=b",
5970 nullptr};
5971
5972 const char* argv2[] = {"foo.exe", nullptr};
5973
5974 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("b"), false);
5975}

◆ TEST_F() [18/54]

testing::TEST_F ( ParseFlagsTest  ,
Empty   
)

Definition at line 5849 of file gtest_unittest.cc.

5849 {
5850 const char* argv[] = {nullptr};
5851
5852 const char* argv2[] = {nullptr};
5853
5854 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags(), false);
5855}
Flags
Definition: scanutils.cpp:31

◆ TEST_F() [19/54]

testing::TEST_F ( ParseFlagsTest  ,
FailFast   
)

Definition at line 5867 of file gtest_unittest.cc.

5867 {
5868 const char* argv[] = {"foo.exe", "--gtest_fail_fast", nullptr};
5869
5870 const char* argv2[] = {"foo.exe", nullptr};
5871
5872 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::FailFast(true), false);
5873}

◆ TEST_F() [20/54]

testing::TEST_F ( ParseFlagsTest  ,
FilterBad   
)

Definition at line 5876 of file gtest_unittest.cc.

5876 {
5877 const char* argv[] = {"foo.exe", "--gtest_filter", nullptr};
5878
5879 const char* argv2[] = {"foo.exe", "--gtest_filter", nullptr};
5880
5881 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter(""), true);
5882}

◆ TEST_F() [21/54]

testing::TEST_F ( ParseFlagsTest  ,
FilterEmpty   
)

Definition at line 5885 of file gtest_unittest.cc.

5885 {
5886 const char* argv[] = {"foo.exe", "--gtest_filter=", nullptr};
5887
5888 const char* argv2[] = {"foo.exe", nullptr};
5889
5890 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter(""), false);
5891}

◆ TEST_F() [22/54]

testing::TEST_F ( ParseFlagsTest  ,
FilterNonEmpty   
)

Definition at line 5894 of file gtest_unittest.cc.

5894 {
5895 const char* argv[] = {"foo.exe", "--gtest_filter=abc", nullptr};
5896
5897 const char* argv2[] = {"foo.exe", nullptr};
5898
5899 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("abc"), false);
5900}

◆ TEST_F() [23/54]

testing::TEST_F ( ParseFlagsTest  ,
ListTestsFalse   
)

Definition at line 6010 of file gtest_unittest.cc.

6010 {
6011 const char* argv[] = {"foo.exe", "--gtest_list_tests=0", nullptr};
6012
6013 const char* argv2[] = {"foo.exe", nullptr};
6014
6015 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false), false);
6016}

◆ TEST_F() [24/54]

testing::TEST_F ( ParseFlagsTest  ,
ListTestsFalse_f   
)

Definition at line 6019 of file gtest_unittest.cc.

6019 {
6020 const char* argv[] = {"foo.exe", "--gtest_list_tests=f", nullptr};
6021
6022 const char* argv2[] = {"foo.exe", nullptr};
6023
6024 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false), false);
6025}

◆ TEST_F() [25/54]

testing::TEST_F ( ParseFlagsTest  ,
ListTestsFalse_F   
)

Definition at line 6028 of file gtest_unittest.cc.

6028 {
6029 const char* argv[] = {"foo.exe", "--gtest_list_tests=F", nullptr};
6030
6031 const char* argv2[] = {"foo.exe", nullptr};
6032
6033 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false), false);
6034}

◆ TEST_F() [26/54]

testing::TEST_F ( ParseFlagsTest  ,
ListTestsFlag   
)

Definition at line 5992 of file gtest_unittest.cc.

5992 {
5993 const char* argv[] = {"foo.exe", "--gtest_list_tests", nullptr};
5994
5995 const char* argv2[] = {"foo.exe", nullptr};
5996
5997 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(true), false);
5998}

◆ TEST_F() [27/54]

testing::TEST_F ( ParseFlagsTest  ,
ListTestsTrue   
)

Definition at line 6001 of file gtest_unittest.cc.

6001 {
6002 const char* argv[] = {"foo.exe", "--gtest_list_tests=1", nullptr};
6003
6004 const char* argv2[] = {"foo.exe", nullptr};
6005
6006 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(true), false);
6007}

◆ TEST_F() [28/54]

testing::TEST_F ( ParseFlagsTest  ,
NoFlag   
)

Definition at line 5858 of file gtest_unittest.cc.

5858 {
5859 const char* argv[] = {"foo.exe", nullptr};
5860
5861 const char* argv2[] = {"foo.exe", nullptr};
5862
5863 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags(), false);
5864}

◆ TEST_F() [29/54]

testing::TEST_F ( ParseFlagsTest  ,
OutputEmpty   
)

Definition at line 6037 of file gtest_unittest.cc.

6037 {
6038 const char* argv[] = {"foo.exe", "--gtest_output", nullptr};
6039
6040 const char* argv2[] = {"foo.exe", "--gtest_output", nullptr};
6041
6042 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags(), true);
6043}

◆ TEST_F() [30/54]

testing::TEST_F ( ParseFlagsTest  ,
OutputXml   
)

Definition at line 6046 of file gtest_unittest.cc.

6046 {
6047 const char* argv[] = {"foo.exe", "--gtest_output=xml", nullptr};
6048
6049 const char* argv2[] = {"foo.exe", nullptr};
6050
6051 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml"), false);
6052}

◆ TEST_F() [31/54]

testing::TEST_F ( ParseFlagsTest  ,
OutputXmlDirectory   
)

Definition at line 6064 of file gtest_unittest.cc.

6064 {
6065 const char* argv[] = {"foo.exe", "--gtest_output=xml:directory/path/",
6066 nullptr};
6067
6068 const char* argv2[] = {"foo.exe", nullptr};
6069
6070 GTEST_TEST_PARSING_FLAGS_(argv, argv2,
6071 Flags::Output("xml:directory/path/"), false);
6072}

◆ TEST_F() [32/54]

testing::TEST_F ( ParseFlagsTest  ,
OutputXmlFile   
)

Definition at line 6055 of file gtest_unittest.cc.

6055 {
6056 const char* argv[] = {"foo.exe", "--gtest_output=xml:file", nullptr};
6057
6058 const char* argv2[] = {"foo.exe", nullptr};
6059
6060 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml:file"), false);
6061}

◆ TEST_F() [33/54]

testing::TEST_F ( ParseFlagsTest  ,
PrintTimeFalse   
)

Definition at line 6120 of file gtest_unittest.cc.

6120 {
6121 const char* argv[] = {"foo.exe", "--gtest_print_time=0", nullptr};
6122
6123 const char* argv2[] = {"foo.exe", nullptr};
6124
6125 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false), false);
6126}

◆ TEST_F() [34/54]

testing::TEST_F ( ParseFlagsTest  ,
PrintTimeFalse_f   
)

Definition at line 6129 of file gtest_unittest.cc.

6129 {
6130 const char* argv[] = {"foo.exe", "--gtest_print_time=f", nullptr};
6131
6132 const char* argv2[] = {"foo.exe", nullptr};
6133
6134 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false), false);
6135}

◆ TEST_F() [35/54]

testing::TEST_F ( ParseFlagsTest  ,
PrintTimeFalse_F   
)

Definition at line 6138 of file gtest_unittest.cc.

6138 {
6139 const char* argv[] = {"foo.exe", "--gtest_print_time=F", nullptr};
6140
6141 const char* argv2[] = {"foo.exe", nullptr};
6142
6143 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false), false);
6144}

◆ TEST_F() [36/54]

testing::TEST_F ( ParseFlagsTest  ,
PrintTimeFlag   
)

Definition at line 6102 of file gtest_unittest.cc.

6102 {
6103 const char* argv[] = {"foo.exe", "--gtest_print_time", nullptr};
6104
6105 const char* argv2[] = {"foo.exe", nullptr};
6106
6107 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(true), false);
6108}

◆ TEST_F() [37/54]

testing::TEST_F ( ParseFlagsTest  ,
PrintTimeTrue   
)

Definition at line 6111 of file gtest_unittest.cc.

6111 {
6112 const char* argv[] = {"foo.exe", "--gtest_print_time=1", nullptr};
6113
6114 const char* argv2[] = {"foo.exe", nullptr};
6115
6116 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(true), false);
6117}

◆ TEST_F() [38/54]

testing::TEST_F ( ParseFlagsTest  ,
RandomSeed   
)

Definition at line 6147 of file gtest_unittest.cc.

6147 {
6148 const char* argv[] = {"foo.exe", "--gtest_random_seed=1000", nullptr};
6149
6150 const char* argv2[] = {"foo.exe", nullptr};
6151
6152 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::RandomSeed(1000), false);
6153}

◆ TEST_F() [39/54]

testing::TEST_F ( ParseFlagsTest  ,
Repeat   
)

Definition at line 6156 of file gtest_unittest.cc.

6156 {
6157 const char* argv[] = {"foo.exe", "--gtest_repeat=1000", nullptr};
6158
6159 const char* argv2[] = {"foo.exe", nullptr};
6160
6161 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Repeat(1000), false);
6162}

◆ TEST_F() [40/54]

testing::TEST_F ( ParseFlagsTest  ,
ShuffleFalse_0   
)

Definition at line 6206 of file gtest_unittest.cc.

6206 {
6207 const char* argv[] = {"foo.exe", "--gtest_shuffle=0", nullptr};
6208
6209 const char* argv2[] = {"foo.exe", nullptr};
6210
6211 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(false), false);
6212}

◆ TEST_F() [41/54]

testing::TEST_F ( ParseFlagsTest  ,
ShuffleTrue   
)

Definition at line 6215 of file gtest_unittest.cc.

6215 {
6216 const char* argv[] = {"foo.exe", "--gtest_shuffle=1", nullptr};
6217
6218 const char* argv2[] = {"foo.exe", nullptr};
6219
6220 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(true), false);
6221}

◆ TEST_F() [42/54]

testing::TEST_F ( ParseFlagsTest  ,
ShuffleWithoutValue   
)

Definition at line 6197 of file gtest_unittest.cc.

6197 {
6198 const char* argv[] = {"foo.exe", "--gtest_shuffle", nullptr};
6199
6200 const char* argv2[] = {"foo.exe", nullptr};
6201
6202 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(true), false);
6203}

◆ TEST_F() [43/54]

testing::TEST_F ( ParseFlagsTest  ,
StackTraceDepth   
)

Definition at line 6224 of file gtest_unittest.cc.

6224 {
6225 const char* argv[] = {"foo.exe", "--gtest_stack_trace_depth=5", nullptr};
6226
6227 const char* argv2[] = {"foo.exe", nullptr};
6228
6229 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::StackTraceDepth(5), false);
6230}

◆ TEST_F() [44/54]

testing::TEST_F ( ParseFlagsTest  ,
StreamResultTo   
)

Definition at line 6232 of file gtest_unittest.cc.

6232 {
6233 const char* argv[] = {"foo.exe", "--gtest_stream_result_to=localhost:1234",
6234 nullptr};
6235
6236 const char* argv2[] = {"foo.exe", nullptr};
6237
6239 argv, argv2, Flags::StreamResultTo("localhost:1234"), false);
6240}

◆ TEST_F() [45/54]

testing::TEST_F ( ParseFlagsTest  ,
ThrowOnFailureFalse_0   
)

Definition at line 6252 of file gtest_unittest.cc.

6252 {
6253 const char* argv[] = {"foo.exe", "--gtest_throw_on_failure=0", nullptr};
6254
6255 const char* argv2[] = {"foo.exe", nullptr};
6256
6257 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(false), false);
6258}

◆ TEST_F() [46/54]

testing::TEST_F ( ParseFlagsTest  ,
ThrowOnFailureTrue   
)

Definition at line 6262 of file gtest_unittest.cc.

6262 {
6263 const char* argv[] = {"foo.exe", "--gtest_throw_on_failure=1", nullptr};
6264
6265 const char* argv2[] = {"foo.exe", nullptr};
6266
6267 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(true), false);
6268}

◆ TEST_F() [47/54]

testing::TEST_F ( ParseFlagsTest  ,
ThrowOnFailureWithoutValue   
)

Definition at line 6243 of file gtest_unittest.cc.

6243 {
6244 const char* argv[] = {"foo.exe", "--gtest_throw_on_failure", nullptr};
6245
6246 const char* argv2[] = {"foo.exe", nullptr};
6247
6248 GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(true), false);
6249}

◆ TEST_F() [48/54]

testing::TEST_F ( ParseFlagsTest  ,
UnrecognizedFlag   
)

Definition at line 5978 of file gtest_unittest.cc.

5978 {
5979 const char* argv[] = {"foo.exe", "--gtest_break_on_failure",
5980 "bar", // Unrecognized by Google Test.
5981 "--gtest_filter=b", nullptr};
5982
5983 const char* argv2[] = {"foo.exe", "bar", nullptr};
5984
5985 Flags flags;
5986 flags.break_on_failure = true;
5987 flags.filter = "b";
5988 GTEST_TEST_PARSING_FLAGS_(argv, argv2, flags, false);
5989}

◆ TEST_F() [49/54]

testing::TEST_F ( SetUpTestCaseTest  ,
Test1   
)

Definition at line 5495 of file gtest_unittest.cc.

5495{ EXPECT_STRNE(nullptr, shared_resource_); }
#define EXPECT_STRNE(s1, s2)
Definition: gtest.h:2114

◆ TEST_F() [50/54]

testing::TEST_F ( SetUpTestCaseTest  ,
Test2   
)

Definition at line 5498 of file gtest_unittest.cc.

5498 {
5499 EXPECT_STREQ("123", shared_resource_);
5500}

◆ TEST_F() [51/54]

testing::TEST_F ( SetUpTestSuiteTest  ,
TestSetupTestSuite1   
)

Definition at line 5556 of file gtest_unittest.cc.

5556 {
5557 EXPECT_STRNE(nullptr, shared_resource_);
5558}

◆ TEST_F() [52/54]

testing::TEST_F ( SetUpTestSuiteTest  ,
TestSetupTestSuite2   
)

Definition at line 5561 of file gtest_unittest.cc.

5561 {
5562 EXPECT_STREQ("123", shared_resource_);
5563}

◆ TEST_F() [53/54]

testing::TEST_F ( TestInfoTest  ,
Names   
)

Definition at line 5369 of file gtest_unittest.cc.

5369 {
5370 const TestInfo* const test_info = GetTestInfo("Names");
5371
5372 ASSERT_STREQ("TestInfoTest", test_info->test_suite_name());
5373 ASSERT_STREQ("Names", test_info->name());
5374}

◆ TEST_F() [54/54]

testing::TEST_F ( TestInfoTest  ,
result   
)

Definition at line 5377 of file gtest_unittest.cc.

5377 {
5378 const TestInfo* const test_info = GetTestInfo("result");
5379
5380 // Initially, there is no TestPartResult for this test.
5381 ASSERT_EQ(0, GetTestResult(test_info)->total_part_count());
5382
5383 // After the previous assertion, there is still none.
5384 ASSERT_EQ(0, GetTestResult(test_info)->total_part_count());
5385}
#define ASSERT_EQ(val1, val2)
Definition: gtest.h:2073

◆ TEST_P()

testing::TEST_P ( CodeLocationForTESTP  ,
Verify   
)

Definition at line 5408 of file gtest_unittest.cc.

5408 {
5410}

◆ TYPED_TEST()

testing::TYPED_TEST ( CodeLocationForTYPEDTEST  ,
Verify   
)

Definition at line 5420 of file gtest_unittest.cc.

5420 {
5422}

◆ TYPED_TEST_P()

testing::TYPED_TEST_P ( CodeLocationForTYPEDTESTP  ,
Verify   
)

Definition at line 5430 of file gtest_unittest.cc.

5430 {
5432}

◆ TYPED_TEST_SUITE()

testing::TYPED_TEST_SUITE ( CodeLocationForTYPEDTEST  ,
int   
)

◆ TYPED_TEST_SUITE_P()

testing::TYPED_TEST_SUITE_P ( CodeLocationForTYPEDTESTP  )

◆ Values()

template<typename... T>
internal::ValueArray< T... > testing::Values ( T...  v)

Definition at line 332 of file gtest-param-test.h.

332 {
333 return internal::ValueArray<T...>(std::move(v)...);
334}

◆ ValuesIn() [1/3]

template<class Container >
internal::ParamGenerator< typename Container::value_type > testing::ValuesIn ( const Container &  container)

Definition at line 306 of file gtest-param-test.h.

307 {
308 return ValuesIn(container.begin(), container.end());
309}
internal::ParamGenerator< typename Container::value_type > ValuesIn(const Container &container)

◆ ValuesIn() [2/3]

template<typename T , size_t N>
internal::ParamGenerator< T > testing::ValuesIn ( const T(&)  array[N])

Definition at line 301 of file gtest-param-test.h.

301 {
302 return ValuesIn(array, array + N);
303}

◆ ValuesIn() [3/3]

template<typename ForwardIterator >
internal::ParamGenerator< typename std::iterator_traits< ForwardIterator >::value_type > testing::ValuesIn ( ForwardIterator  begin,
ForwardIterator  end 
)

Definition at line 294 of file gtest-param-test.h.

294 {
295 typedef typename std::iterator_traits<ForwardIterator>::value_type ParamType;
298}

◆ WithArg()

template<size_t k, typename InnerAction >
internal::WithArgsAction< typename std::decay< InnerAction >::type, k > testing::WithArg ( InnerAction &&  action)

Definition at line 1216 of file gmock-actions.h.

1216 {
1217 return {std::forward<InnerAction>(action)};
1218}

◆ WithArgs()

template<size_t k, size_t... ks, typename InnerAction >
internal::WithArgsAction< typename std::decay< InnerAction >::type, k, ks... > testing::WithArgs ( InnerAction &&  action)

Definition at line 1226 of file gmock-actions.h.

1226 {
1227 return {std::forward<InnerAction>(action)};
1228}

◆ WithoutArgs()

template<typename InnerAction >
internal::WithArgsAction< typename std::decay< InnerAction >::type > testing::WithoutArgs ( InnerAction &&  action)

Definition at line 1236 of file gmock-actions.h.

1236 {
1237 return {std::forward<InnerAction>(action)};
1238}

Variable Documentation

◆ GTEST_ATTRIBUTE_UNUSED_

class GTEST_API_ testing::ScopedTrace testing::GTEST_ATTRIBUTE_UNUSED_