- 3.0.1 core module.
googletest-output-test_.cc File Reference
#include "gtest/gtest-spi.h"
#include "gtest/gtest.h"
#include "src/gtest-internal-inl.h"
#include <stdlib.h>

Classes

class  FailingParamTest
 
class  NonFatalFailureInFixtureConstructorTest
 
class  FatalFailureInFixtureConstructorTest
 
class  NonFatalFailureInSetUpTest
 
class  FatalFailureInSetUpTest
 
class  foo::MixedUpTestSuiteTest
 
class  foo::MixedUpTestSuiteWithSameTestNameTest
 
class  bar::MixedUpTestSuiteTest
 
class  bar::MixedUpTestSuiteWithSameTestNameTest
 
class  TEST_F_before_TEST_in_same_test_case
 
class  TEST_before_TEST_F_in_same_test_case
 
class  ParamTest
 
class  ExpectFailureTest
 
class  DynamicFixture
 
class  DynamicTest< Pass >
 
class  FooEnvironment
 
class  BarEnvironment
 

Namespaces

 foo
 
 bar
 

Functions

void TestEq1 (int x)
 
void TryTestSubroutine ()
 
 TEST (PassingTest, PassingTest1)
 
 TEST (PassingTest, PassingTest2)
 
 TEST_P (FailingParamTest, Fails)
 
 INSTANTIATE_TEST_SUITE_P (PrintingFailingParams, FailingParamTest, testing::Values(2))
 
 TEST (NonfatalFailureTest, EscapesStringOperands)
 
 TEST (NonfatalFailureTest, DiffForLongStrings)
 
 TEST (FatalFailureTest, FatalFailureInSubroutine)
 
 TEST (FatalFailureTest, FatalFailureInNestedSubroutine)
 
 TEST (FatalFailureTest, NonfatalFailureInSubroutine)
 
 TEST (LoggingTest, InterleavingLoggingAndAssertions)
 
void SubWithoutTrace (int n)
 
void SubWithTrace (int n)
 
 TEST (SCOPED_TRACETest, AcceptedValues)
 
 TEST (SCOPED_TRACETest, ObeysScopes)
 
 TEST (SCOPED_TRACETest, WorksInLoop)
 
 TEST (SCOPED_TRACETest, WorksInSubroutine)
 
 TEST (SCOPED_TRACETest, CanBeNested)
 
 TEST (SCOPED_TRACETest, CanBeRepeated)
 
 TEST (ScopedTraceTest, WithExplicitFileAndLine)
 
 TEST (DisabledTestsWarningTest, DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning)
 
void AdHocTest ()
 
int RunAllTests ()
 
 TEST_F (NonFatalFailureInFixtureConstructorTest, FailureInConstructor)
 
 TEST_F (FatalFailureInFixtureConstructorTest, FailureInConstructor)
 
 TEST_F (NonFatalFailureInSetUpTest, FailureInSetUp)
 
 TEST_F (FatalFailureInSetUpTest, FailureInSetUp)
 
 TEST (AddFailureAtTest, MessageContainsSpecifiedFileAndLineNumber)
 
 TEST (GtestFailAtTest, MessageContainsSpecifiedFileAndLineNumber)
 
 foo::TEST_F (MixedUpTestSuiteTest, FirstTestFromNamespaceFoo)
 
 foo::TEST_F (MixedUpTestSuiteTest, SecondTestFromNamespaceFoo)
 
 foo::TEST_F (MixedUpTestSuiteWithSameTestNameTest, TheSecondTestWithThisNameShouldFail)
 
 bar::TEST_F (MixedUpTestSuiteTest, ThisShouldFail)
 
 bar::TEST_F (MixedUpTestSuiteTest, ThisShouldFailToo)
 
 bar::TEST_F (MixedUpTestSuiteWithSameTestNameTest, TheSecondTestWithThisNameShouldFail)
 
 TEST_F (TEST_F_before_TEST_in_same_test_case, DefinedUsingTEST_F)
 
 TEST (TEST_F_before_TEST_in_same_test_case, DefinedUsingTESTAndShouldFail)
 
 TEST (TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST)
 
 TEST_F (TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST_FAndShouldFail)
 
 TEST (ExpectNonfatalFailureTest, CanReferenceGlobalVariables)
 
 TEST (ExpectNonfatalFailureTest, CanReferenceLocalVariables)
 
 TEST (ExpectNonfatalFailureTest, SucceedsWhenThereIsOneNonfatalFailure)
 
 TEST (ExpectNonfatalFailureTest, FailsWhenThereIsNoNonfatalFailure)
 
 TEST (ExpectNonfatalFailureTest, FailsWhenThereAreTwoNonfatalFailures)
 
 TEST (ExpectNonfatalFailureTest, FailsWhenThereIsOneFatalFailure)
 
 TEST (ExpectNonfatalFailureTest, FailsWhenStatementReturns)
 
 TEST (ExpectFatalFailureTest, CanReferenceGlobalVariables)
 
 TEST (ExpectFatalFailureTest, CanReferenceLocalStaticVariables)
 
 TEST (ExpectFatalFailureTest, SucceedsWhenThereIsOneFatalFailure)
 
 TEST (ExpectFatalFailureTest, FailsWhenThereIsNoFatalFailure)
 
void FatalFailure ()
 
 TEST (ExpectFatalFailureTest, FailsWhenThereAreTwoFatalFailures)
 
 TEST (ExpectFatalFailureTest, FailsWhenThereIsOneNonfatalFailure)
 
 TEST (ExpectFatalFailureTest, FailsWhenStatementReturns)
 
std::string ParamNameFunc (const testing::TestParamInfo< std::string > &info)
 
 TEST_P (ParamTest, Success)
 
 TEST_P (ParamTest, Failure)
 
 INSTANTIATE_TEST_SUITE_P (PrintingStrings, ParamTest, testing::Values(std::string("a")), ParamNameFunc)
 
 TEST_F (ExpectFailureTest, ExpectFatalFailure)
 
 TEST_F (ExpectFailureTest, ExpectNonFatalFailure)
 
 TEST_F (ExpectFailureTest, ExpectFatalFailureOnAllThreads)
 
 TEST_F (ExpectFailureTest, ExpectNonFatalFailureOnAllThreads)
 
int main (int argc, char **argv)
 

Variables

int global_integer = 0
 
auto dynamic_test
 

Function Documentation

void TestEq1 ( int  x)

References ASSERT_EQ.

Referenced by TryTestSubroutine().

void TryTestSubroutine ( )

References FAIL, testing::Test::HasFatalFailure(), and TestEq1().

Referenced by TEST().

TEST ( PassingTest  ,
PassingTest1   
)

Referenced by TEST(), and TEST_P().

TEST ( PassingTest  ,
PassingTest2   
)
INSTANTIATE_TEST_SUITE_P ( PrintingFailingParams  ,
FailingParamTest  ,
testing::Values(2)   
)

Referenced by TEST_P().

TEST ( NonfatalFailureTest  ,
EscapesStringOperands   
)

References EXPECT_EQ.

TEST ( NonfatalFailureTest  ,
DiffForLongStrings   
)

References EXPECT_EQ.

TEST ( FatalFailureTest  ,
FatalFailureInSubroutine   
)

References TryTestSubroutine().

TEST ( FatalFailureTest  ,
FatalFailureInNestedSubroutine   
)
TEST ( FatalFailureTest  ,
NonfatalFailureInSubroutine   
)
TEST ( LoggingTest  ,
InterleavingLoggingAndAssertions   
)

References EXPECT_GE, and i.

void SubWithoutTrace ( int  n)

References ASSERT_EQ, and EXPECT_EQ.

Referenced by SubWithTrace(), and TEST().

void SubWithTrace ( int  n)

References SCOPED_TRACE, and SubWithoutTrace().

Referenced by TEST().

TEST ( SCOPED_TRACETest  ,
AcceptedValues   
)

References ADD_FAILURE, and SCOPED_TRACE.

TEST ( SCOPED_TRACETest  ,
ObeysScopes   
)

References ADD_FAILURE, and SCOPED_TRACE.

TEST ( SCOPED_TRACETest  ,
WorksInLoop   
)

References i, SCOPED_TRACE, and SubWithoutTrace().

TEST ( SCOPED_TRACETest  ,
WorksInSubroutine   
)

References SubWithTrace().

TEST ( SCOPED_TRACETest  ,
CanBeNested   
)

References SCOPED_TRACE, and SubWithTrace().

TEST ( SCOPED_TRACETest  ,
CanBeRepeated   
)

References ADD_FAILURE, SCOPED_TRACE, and TEST().

TEST ( ScopedTraceTest  ,
WithExplicitFileAndLine   
)

References ADD_FAILURE.

TEST ( DisabledTestsWarningTest  ,
DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning   
)
void AdHocTest ( )

References EXPECT_EQ, and EXPECT_TRUE.

Referenced by RunAllTests().

TEST_F ( NonFatalFailureInFixtureConstructorTest  ,
FailureInConstructor   
)

References ADD_FAILURE.

Referenced by TEST_F().

TEST_F ( FatalFailureInFixtureConstructorTest  ,
FailureInConstructor   
)

References ADD_FAILURE.

TEST_F ( NonFatalFailureInSetUpTest  ,
FailureInSetUp   
)

References FAIL.

TEST_F ( FatalFailureInSetUpTest  ,
FailureInSetUp   
)

References FAIL.

TEST ( AddFailureAtTest  ,
MessageContainsSpecifiedFileAndLineNumber   
)

References ADD_FAILURE_AT.

TEST ( GtestFailAtTest  ,
MessageContainsSpecifiedFileAndLineNumber   
)
TEST_F ( TEST_F_before_TEST_in_same_test_case  ,
DefinedUsingTEST_F   
)
TEST ( TEST_F_before_TEST_in_same_test_case  ,
DefinedUsingTESTAndShouldFail   
)
TEST ( TEST_before_TEST_F_in_same_test_case  ,
DefinedUsingTEST   
)
TEST_F ( TEST_before_TEST_F_in_same_test_case  ,
DefinedUsingTEST_FAndShouldFail   
)
TEST ( ExpectNonfatalFailureTest  ,
CanReferenceGlobalVariables   
)
TEST ( ExpectNonfatalFailureTest  ,
CanReferenceLocalVariables   
)

References EXPECT_EQ, EXPECT_NONFATAL_FAILURE, and n.

TEST ( ExpectNonfatalFailureTest  ,
SucceedsWhenThereIsOneNonfatalFailure   
)
TEST ( ExpectNonfatalFailureTest  ,
FailsWhenThereIsNoNonfatalFailure   
)
TEST ( ExpectNonfatalFailureTest  ,
FailsWhenThereAreTwoNonfatalFailures   
)
TEST ( ExpectNonfatalFailureTest  ,
FailsWhenThereIsOneFatalFailure   
)

References EXPECT_NONFATAL_FAILURE, and FAIL.

TEST ( ExpectNonfatalFailureTest  ,
FailsWhenStatementReturns   
)

References EXPECT_NONFATAL_FAILURE, and TEST().

TEST ( ExpectFatalFailureTest  ,
CanReferenceGlobalVariables   
)

References ASSERT_EQ, and EXPECT_FATAL_FAILURE.

TEST ( ExpectFatalFailureTest  ,
CanReferenceLocalStaticVariables   
)

References ASSERT_EQ, EXPECT_FATAL_FAILURE, and n.

TEST ( ExpectFatalFailureTest  ,
SucceedsWhenThereIsOneFatalFailure   
)

References EXPECT_FATAL_FAILURE, and FAIL.

TEST ( ExpectFatalFailureTest  ,
FailsWhenThereIsNoFatalFailure   
)

References EXPECT_FATAL_FAILURE.

void FatalFailure ( )

References FAIL.

Referenced by TEST().

TEST ( ExpectFatalFailureTest  ,
FailsWhenThereAreTwoFatalFailures   
)
TEST ( ExpectFatalFailureTest  ,
FailsWhenThereIsOneNonfatalFailure   
)
TEST ( ExpectFatalFailureTest  ,
FailsWhenStatementReturns   
)

References EXPECT_FATAL_FAILURE, and TEST().

std::string ParamNameFunc ( const testing::TestParamInfo< std::string > &  info)
TEST_P ( ParamTest  ,
Success   
)
INSTANTIATE_TEST_SUITE_P ( PrintingStrings  ,
ParamTest  ,
testing::Values(std::string("a"))  ,
ParamNameFunc   
)
TEST_F ( ExpectFailureTest  ,
ExpectFatalFailure   
)

References EXPECT_FATAL_FAILURE, and SUCCEED.

TEST_F ( ExpectFailureTest  ,
ExpectNonFatalFailure   
)
TEST_F ( ExpectFailureTest  ,
ExpectFatalFailureOnAllThreads   
)
TEST_F ( ExpectFailureTest  ,
ExpectNonFatalFailureOnAllThreads   
)

Variable Documentation

int global_integer = 0
auto dynamic_test