Lines Matching refs:TEST
32 // Tests for Google Test itself. This verifies that the basic constructs of
33 // Google Test work.
42 TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
63 // Indicates that this translation unit is part of Google Test's
82 // that are needed to test it.
137 using testing::Test;
222 TEST(GetRandomSeedFromFlagTest, HandlesZero) {
228 TEST(GetRandomSeedFromFlagTest, PreservesValidSeed) {
236 TEST(GetRandomSeedFromFlagTest, NormalizesInvalidSeed) {
246 TEST(GetNextRandomSeedTest, WorksForValidInput) {
253 // We deliberately don't test GetNextRandomSeed() with invalid
266 TEST(GetTypeIdTest, ReturnsSameValueForSameType) {
268 EXPECT_EQ(GetTypeId<Test>(), GetTypeId<Test>());
271 class SubClassOfTest : public Test {};
272 class AnotherSubClassOfTest : public Test {};
274 TEST(GetTypeIdTest, ReturnsDifferentValuesForDifferentTypes) {
284 // is called from inside Google Test or outside of it.
285 TEST(GetTestTypeIdTest, ReturnsTheSameValueInsideOrOutsideOfGoogleTest) {
291 TEST(FormatTimeInMillisAsSecondsTest, FormatsZero) {
295 TEST(FormatTimeInMillisAsSecondsTest, FormatsPositiveNumber) {
303 TEST(FormatTimeInMillisAsSecondsTest, FormatsNegativeNumber) {
320 TEST(NullLiteralTest, IsTrueForNullLiterals) {
338 TEST(NullLiteralTest, IsFalseForNonNullLiterals) {
355 TEST(CodePointToUtf8Test, CanEncodeNul) {
361 TEST(CodePointToUtf8Test, CanEncodeAscii) {
371 TEST(CodePointToUtf8Test, CanEncode8To11Bits) {
386 TEST(CodePointToUtf8Test, CanEncode12To16Bits) {
404 TEST(CodePointToUtf8Test, CanEncode17To21Bits) {
417 TEST(CodePointToUtf8Test, CanEncodeInvalidCodePoint) {
428 TEST(WideStringToUtf8Test, CanEncodeNul) {
434 TEST(WideStringToUtf8Test, CanEncodeAscii) {
443 TEST(WideStringToUtf8Test, CanEncode8To11Bits) {
456 TEST(WideStringToUtf8Test, CanEncode12To16Bits) {
469 TEST(WideStringToUtf8Test, StopsOnNulCharacter) {
475 TEST(WideStringToUtf8Test, StopsWhenLengthLimitReached) {
483 TEST(WideStringToUtf8Test, CanEncode17To21Bits) {
494 TEST(WideStringToUtf8Test, CanEncodeInvalidCodePoint) {
501 TEST(WideStringToUtf8Test, CanEncodeValidUtf16SUrrogatePairs) {
508 TEST(WideStringToUtf8Test, CanEncodeInvalidUtf16SurrogatePair) {
523 TEST(WideStringToUtf8Test, ConcatenatesCodepointsCorrectly) {
535 TEST(WideStringToUtf8Test, ConcatenatesCodepointsCorrectly) {
545 TEST(RandomDeathTest, GeneratesCrashesOnInvalidRange) {
556 TEST(RandomTest, GeneratesNumbersWithinRange) {
569 TEST(RandomTest, RepeatsWhenReseeded) {
592 TEST(ContainerUtilityTest, CountIf) {
611 TEST(ContainerUtilityTest, ForEach) {
630 TEST(ContainerUtilityTest, GetElementOr) {
642 TEST(ContainerUtilityDeathTest, ShuffleRange) {
663 class VectorShuffleTest : public Test {
827 TEST(AssertHelperTest, AssertHelperIsSmall) {
836 TEST(StringTest, Constructors) {
886 TEST(StringTest, ConvertsFromStdString) {
908 TEST(StringTest, ConvertsToStdString) {
927 TEST(StringTest, ConvertsFromGlobalString) {
949 TEST(StringTest, ConvertsToGlobalString) {
968 TEST(StringTest, ShowCStringQuoted) {
978 TEST(StringTest, Empty) {
987 TEST(StringTest, Compare) {
1025 TEST(StringTest, Equals) {
1047 TEST(StringTest, NotEquals) {
1069 TEST(StringTest, Length) {
1077 TEST(StringTest, EndsWith) {
1087 TEST(StringTest, EndsWithCaseInsensitive) {
1104 TEST(StringTest, CaseInsensitiveWideCStringEquals) {
1116 TEST(StringTest, CanBeAssignedNULL) {
1125 TEST(StringTest, CanBeAssignedEmpty) {
1134 TEST(StringTest, CanBeAssignedNonEmpty) {
1151 TEST(StringTest, CanBeAssignedSelf) {
1163 TEST(StringTest, Streams) {
1171 TEST(StringTest, FormatWorks) {
1200 TEST(StringTest, ShowWideCString) {
1208 TEST(StringTest, ShowWideCStringQuoted) {
1218 TEST(StringTest, AnsiAndUtf16Null) {
1223 TEST(StringTest, AnsiAndUtf16ConvertBasic) {
1232 TEST(StringTest, AnsiAndUtf16ConvertPathChars) {
1245 TEST(TestPropertyTest, StringValue) {
1252 TEST(TestPropertyTest, ReplaceStringValue) {
1270 class ScopedFakeTestPartResultReporterTest : public Test {
1285 // Tests that ScopedFakeTestPartResultReporter intercepts test
1366 // We have another test below to verify that the macro catches fatal
1455 // We have another test below to verify that the macro catches
1495 TEST(TestPropertyTest, ConstructorWorks) {
1501 TEST(TestPropertyTest, SetValue) {
1511 // The test fixture for testing TestResult.
1512 class TestResultTest : public Test {
1540 // In order to test TestResult, we need to modify its internal
1617 TEST(TestResultPropertyTest, NoPropertiesFoundWhenNoneAreAdded) {
1623 TEST(TestResultPropertyTest, OnePropertyFoundWhenAdded) {
1634 TEST(TestResultPropertyTest, MultiplePropertiesFoundWhenAdded) {
1651 TEST(TestResultPropertyTest, OverridesValuesForDuplicateKeys) {
1673 TEST(TestResultPropertyDeathTest, GetTestProperty) {
1713 TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledName) {
1719 TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledStatus) {
1725 TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledTime) {
1731 TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledClassname) {
1737 class GTestFlagSaverTest : public Test {
1739 // Saves the Google Test flags such that we can restore them later, and
1741 // before the first test in this test case is run.
1762 // Restores the Google Test flags that the tests have modified. This will
1763 // be called after the last test in this test case is run.
1769 // Verifies that the Google Test flags have their default values, and then
1805 // For saving Google Test flags during this test case.
1811 // Google Test doesn't guarantee the order of tests. The following two
1814 // Modifies the Google Test flags in the test body.
1819 // Verifies that the Google Test flags in the body of the previous test were
1871 TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenVariableIsNotSet) {
1878 TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenValueOverflows) {
1890 TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenValueIsInvalid) {
1903 TEST(Int32FromGTestEnvTest, ParsesAndReturnsValidValue) {
1916 TEST(ParseInt32FlagTest, ReturnsFalseForInvalidFlag) {
1927 TEST(ParseInt32FlagTest, ReturnsDefaultWhenValueOverflows) {
1941 TEST(ParseInt32FlagTest, ReturnsDefaultWhenValueIsInvalid) {
1955 TEST(ParseInt32FlagTest, ParsesAndReturnsValidValue) {
1969 TEST(Int32FromEnvOrDieTest, ParsesAndReturnsValidValue) {
1980 TEST(Int32FromEnvOrDieDeathTest, AbortsOnFailure) {
1989 TEST(Int32FromEnvOrDieDeathTest, AbortsOnInt32Overflow) {
1998 TEST(ShouldRunTestOnShardTest, IsPartitionWhenThereIsOneShard) {
2006 class ShouldShardTest : public testing::Test {
2041 // we are not in a death test subprocess.
2086 TEST(ShouldRunTestOnShardTest, IsPartitionWhenThereAreFiveShards) {
2091 // Check partitioning: each test should be on exactly 1 shard.
2100 << shard_index << " are both selected to run test " << test_id;
2119 // Test class, there are no separate tests for the following classes
2126 // TEST, TEST_F, RUN_ALL_TESTS
2128 TEST(UnitTestTest, CanGetOriginalWorkingDir) {
2244 TEST(Pred1Test, WithoutFormat) {
2258 TEST(Pred1Test, WithFormat) {
2275 TEST(Pred1Test, SingleEvaluationOnFailure) {
2293 TEST(PredTest, WithoutFormat) {
2310 TEST(PredTest, WithFormat) {
2332 TEST(PredTest, SingleEvaluationOnFailure) {
2395 TEST(PredicateAssertionTest, AcceptsOverloadedFunction) {
2403 TEST(PredicateAssertionTest, AcceptsTemplateFunction) {
2439 TEST(PredicateFormatAssertionTest, AcceptsOverloadedFunction) {
2446 TEST(PredicateFormatAssertionTest, AcceptsTemplateFunction) {
2455 TEST(StringAssertionTest, ASSERT_STREQ) {
2468 TEST(StringAssertionTest, ASSERT_STREQ_Null) {
2475 TEST(StringAssertionTest, ASSERT_STREQ_Null2) {
2481 TEST(StringAssertionTest, ASSERT_STRNE) {
2494 TEST(StringAssertionTest, ASSERT_STRCASEEQ) {
2504 TEST(StringAssertionTest, ASSERT_STRCASENE) {
2517 TEST(StringAssertionTest, STREQ_Wide) {
2541 TEST(StringAssertionTest, STRNE_Wide) {
2570 TEST(IsSubstringTest, ReturnsCorrectResultForCString) {
2581 TEST(IsSubstringTest, ReturnsCorrectResultForWideCString) {
2592 TEST(IsSubstringTest, GeneratesCorrectMessageForCString) {
2603 TEST(IsSubstringTest, ReturnsCorrectResultsForStdString) {
2611 TEST(IsSubstringTest, ReturnsCorrectResultForStdWstring) {
2618 TEST(IsSubstringTest, GeneratesCorrectMessageForWstring) {
2634 TEST(IsNotSubstringTest, ReturnsCorrectResultForCString) {
2641 TEST(IsNotSubstringTest, ReturnsCorrectResultForWideCString) {
2648 TEST(IsNotSubstringTest, GeneratesCorrectMessageForWideCString) {
2660 TEST(IsNotSubstringTest, ReturnsCorrectResultsForStdString) {
2667 TEST(IsNotSubstringTest, GeneratesCorrectMessageForStdString) {
2681 TEST(IsNotSubstringTest, ReturnsCorrectResultForStdWstring) {
2692 class FloatingPointTest : public Test {
3115 // Verifies that a test or test case whose name starts with DISABLED_ is
3118 // A test whose name starts with DISABLED_.
3120 TEST(DisabledTest, DISABLED_TestShouldNotRun) {
3121 FAIL() << "Unexpected failure: Disabled test should not be run.";
3124 // A test whose name does not start with DISABLED_.
3126 TEST(DisabledTest, NotDISABLED_TestShouldRun) {
3130 // A test case whose name starts with DISABLED_.
3132 TEST(DISABLED_TestCase, TestShouldNotRun) {
3133 FAIL() << "Unexpected failure: Test in disabled test case should not be run.";
3136 // A test case and test whose names start with DISABLED_.
3138 TEST(DISABLED_TestCase, DISABLED_TestShouldNotRun) {
3139 FAIL() << "Unexpected failure: Test in disabled test case should not be run.";
3142 // Check that when all tests in a test case are disabled, SetupTestCase() and
3144 class DisabledTestsTest : public Test {
3147 FAIL() << "Unexpected failure: All tests disabled in test case. "
3152 FAIL() << "Unexpected failure: All tests disabled in test case. "
3158 FAIL() << "Unexpected failure: Disabled test should not be run.";
3162 FAIL() << "Unexpected failure: Disabled test should not be run.";
3170 class TypedTest : public Test {
3177 FAIL() << "Unexpected failure: Disabled typed test should not run.";
3181 class DISABLED_TypedTest : public Test {
3187 FAIL() << "Unexpected failure: Disabled typed test should not run.";
3197 class TypedTestP : public Test {
3204 << "Disabled type-parameterized test should not run.";
3212 class DISABLED_TypedTestP : public Test {
3219 << "Disabled type-parameterized test should not run.";
3230 class SingleEvaluationTest : public Test {
3232 // This helper function is needed by the FailedASSERT_STREQ test
3239 // This helper function is needed by the FailedASSERT_NE test below. It's
3383 class NoFatalFailureTest : public Test {
3476 TEST(AssertionTest, EqFailure) {
3526 TEST(AssertionTest, AppendUserMessage) {
3544 TEST(AssertionTest, ASSERT_TRUE) {
3551 TEST(AssertionTest, AssertTrueWithAssertionResult) {
3568 TEST(AssertionTest, ASSERT_FALSE) {
3577 TEST(AssertionTest, AssertFalseWithAssertionResult) {
3601 TEST(ExpectTest, ASSERT_EQ_Double) {
3611 TEST(AssertionTest, ASSERT_EQ) {
3621 TEST(AssertionTest, ASSERT_EQ_NULL) {
3626 // static_cast since the test verifies the ability to use bare NULL as the
3639 // that ASSERT_EQ(0, non_pointer) isn't interpreted by Google Test as
3641 TEST(ExpectTest, ASSERT_EQ_0) {
3653 TEST(AssertionTest, ASSERT_NE) {
3661 TEST(AssertionTest, ASSERT_LE) {
3669 TEST(AssertionTest, ASSERT_LT) {
3676 TEST(AssertionTest, ASSERT_GE) {
3684 TEST(AssertionTest, ASSERT_GT) {
3695 TEST(AssertionTest, ASSERT_THROW) {
3714 TEST(AssertionTest, ASSERT_NO_THROW) {
3722 TEST(AssertionTest, ASSERT_ANY_THROW) {
3732 // Makes sure we deal with the precedence of <<. This test should
3734 TEST(AssertionTest, AssertPrecedence) {
3740 // A subroutine used by the following test.
3745 // Tests calling a test subroutine that's not part of a fixture.
3746 TEST(AssertionTest, NonFixtureSubroutine) {
3777 // A subroutine used by the following test.
3782 // A subroutine used by the following test.
3790 TEST(AssertionTest, AssertWorksWithUncopyableObject) {
3801 TEST(AssertionTest, ExpectWorksWithUncopyableObject) {
3817 TEST(AssertionTest, NamedEnum) {
3825 // anonymous enums in assertions. Therefore the following test is not
3836 // We want to test the case where the size of the anonymous enum is
3843 // int size. We want to test whether this will confuse the
3856 TEST(AssertionTest, AnonymousEnum) {
3910 // HRESULT assertion tests test both zero and non-zero
3914 TEST(HRESULTAssertionTest, EXPECT_HRESULT_SUCCEEDED) {
3923 TEST(HRESULTAssertionTest, ASSERT_HRESULT_SUCCEEDED) {
3932 TEST(HRESULTAssertionTest, EXPECT_HRESULT_FAILED) {
3943 TEST(HRESULTAssertionTest, ASSERT_HRESULT_FAILED) {
3960 TEST(HRESULTAssertionTest, Streaming) {
3995 TEST(AssertionSyntaxTest, BasicAssertionsBehavesLikeSingleStatement) {
3998 "It's a compilation test only.";
4017 TEST(ExpectThrowTest, DoesNotGenerateUnreachableCodeWarning) {
4029 TEST(AssertionSyntaxTest, ExceptionAssertionsBehavesLikeSingleStatement) {
4056 TEST(AssertionSyntaxTest, NoFatalFailureAssertionsBehavesLikeSingleStatement) {
4059 << "It's a compilation test only.";
4080 TEST(AssertionSyntaxTest, WorksWithSwitch) {
4093 // than the Boolean assertions. Hence we test them separately.
4111 // Test that the exception assertion macros compile and work with const
4113 TEST(AssertionSyntaxTest, WorksWithConst) {
4125 // Tests that Google Test tracks SUCCEED*.
4126 TEST(SuccessfulAssertionTest, SUCCEED) {
4132 // Tests that Google Test doesn't track successful EXPECT_*.
4133 TEST(SuccessfulAssertionTest, EXPECT) {
4138 // Tests that Google Test doesn't track successful EXPECT_STR*.
4139 TEST(SuccessfulAssertionTest, EXPECT_STR) {
4144 // Tests that Google Test doesn't track successful ASSERT_*.
4145 TEST(SuccessfulAssertionTest, ASSERT) {
4150 // Tests that Google Test doesn't track successful ASSERT_STR*.
4151 TEST(SuccessfulAssertionTest, ASSERT_STR) {
4161 TEST(ExpectTest, EXPECT_TRUE) {
4172 TEST(ExpectTest, ExpectTrueWithAssertionResult) {
4186 TEST(ExpectTest, EXPECT_FALSE) {
4197 TEST(ExpectTest, ExpectFalseWithAssertionResult) {
4216 TEST(ExpectTest, EXPECT_EQ) {
4229 TEST(ExpectTest, EXPECT_EQ_Double) {
4240 TEST(ExpectTest, EXPECT_EQ_NULL) {
4245 // static_cast since the test verifies the ability to use bare NULL as the
4258 // that EXPECT_EQ(0, non_pointer) isn't interpreted by Google Test as
4260 TEST(ExpectTest, EXPECT_EQ_0) {
4272 TEST(ExpectTest, EXPECT_NE) {
4294 TEST(ExpectTest, EXPECT_LE) {
4304 TEST(ExpectTest, EXPECT_LT) {
4313 TEST(ExpectTest, EXPECT_GE) {
4323 TEST(ExpectTest, EXPECT_GT) {
4334 TEST(ExpectTest, EXPECT_THROW) {
4346 TEST(ExpectTest, EXPECT_NO_THROW) {
4354 TEST(ExpectTest, EXPECT_ANY_THROW) {
4365 TEST(ExpectTest, ExpectPrecedence) {
4375 TEST(StreamableToStringTest, Scalar) {
4380 TEST(StreamableToStringTest, Pointer) {
4387 TEST(StreamableToStringTest, NullPointer) {
4393 TEST(StreamableToStringTest, CString) {
4398 TEST(StreamableToStringTest, NullCString) {
4406 TEST(StreamableTest, string) {
4415 TEST(StreamableTest, stringWithEmbeddedNUL) {
4426 TEST(StreamableTest, NULChar) {
4433 TEST(StreamableTest, int) {
4440 // In MSVC, streaming a NULL char * causes access violation. Google Test
4443 TEST(StreamableTest, NullCharPtr) {
4450 TEST(StreamableTest, BasicIoManip) {
4466 TEST(MacroTest, ADD_FAILURE) {
4474 TEST(MacroTest, ADD_FAILURE_AT) {
4489 TEST(MacroTest, FAIL) {
4497 TEST(MacroTest, SUCCEED) {
4511 TEST(EqAssertionTest, Bool) {
4520 TEST(EqAssertionTest, Int) {
4527 TEST(EqAssertionTest, Time_T) {
4536 TEST(EqAssertionTest, Char) {
4546 TEST(EqAssertionTest, WideChar) {
4565 TEST(EqAssertionTest, StdString) {
4568 ASSERT_EQ("Test", ::std::string("Test"));
4577 EXPECT_NONFATAL_FAILURE(EXPECT_EQ("Test", ::std::string("test")),
4578 "::std::string(\"test\")");
4597 TEST(EqAssertionTest, StdWideString) {
4633 TEST(EqAssertionTest, GlobalString) {
4635 EXPECT_EQ("Test", ::string("Test"));
4643 EXPECT_NONFATAL_FAILURE(EXPECT_EQ(::string("Test"), "test"),
4644 "test");
4664 TEST(EqAssertionTest, GlobalWideString) {
4679 }, "Test\\x8119");
4698 TEST(EqAssertionTest, CharPointer) {
4720 TEST(EqAssertionTest, WideCharPointer) {
4745 TEST(EqAssertionTest, OtherPointer) {
4783 TEST(ComparisonAssertionTest, AcceptsUnprintableArgs) {
4817 // This class has a private member we want to test. We will test it
4818 // both in a TEST and in a TEST_F.
4828 FRIEND_TEST(FRIEND_TEST_Test, TEST);
4832 // Tests that the FRIEND_TEST declaration allows a TEST to access a
4834 TEST(FRIEND_TEST_Test, TEST) {
4838 // The fixture needed to test using FRIEND_TEST with TEST_F.
4839 class FRIEND_TEST_Test2 : public Test {
4850 // Tests the life cycle of Test objects.
4852 // The test fixture for testing the life cycle of Test objects.
4854 // This class counts the number of live test objects that uses this
4856 class TestLifeCycleTest : public Test {
4858 // Constructor. Increments the number of test objects that uses
4862 // Destructor. Decrements the number of test objects that uses this
4866 // Returns the number of live test objects that uses this fixture.
4875 // Tests the life cycle of test objects.
4877 // There should be only one test object in this test case that's
4882 // Tests the life cycle of test objects.
4885 // only one live test object, as the object for Test1 should've been
4894 TEST(AssertionResultTest, CopyConstructorWorksWhenNotOptimied) {
4910 TEST(AssertionResultTest, ConstructionWorks) {
4933 TEST(AssertionResultTest, NegationWorks) {
4943 TEST(AssertionResultTest, StreamingWorks) {
4949 TEST(AssertionResultTest, CanStreamOstreamManipulators) {
4973 TEST(MessageTest, CanStreamUserTypeInGlobalNameSpace) {
4998 TEST(MessageTest, CanStreamUserTypeInUnnamedNameSpace) {
5023 TEST(MessageTest, CanStreamUserTypeInUserNameSpace) {
5048 TEST(MessageTest, CanStreamUserTypeInUserNameSpaceWithStreamOperatorInGlobal) {
5057 TEST(MessageTest, NullPointers) {
5072 TEST(MessageTest, WideStrings) {
5100 class TestInfoTest : public Test {
5132 // Initially, there is no TestPartResult for this test.
5139 // Tests setting up and tearing down a test case.
5141 class SetUpTestCaseTest : public Test {
5143 // This will be called once before the first test in this test case
5146 printf("Setting up the test case . . .\n");
5153 // Increments the number of test cases that have been set up.
5160 // This will be called once after the last test in this test case is
5163 printf("Tearing down the test case . . .\n");
5165 // Decrements the number of test cases that have been set up.
5175 // This will be called before each test in this test case.
5182 // Number of test cases that have been set up.
5185 // Some resource to be shared by all tests in this test case.
5192 // A test that uses the shared resource.
5197 // Another test that uses the shared resource.
5202 // The InitGoogleTestTest test case tests testing::InitGoogleTest().
5204 // The Flags struct stores a copy of all Google Test flags.
5354 class InitGoogleTestTest : public Test {
5356 // Clears the flags before each test.
5673 "bar", // Unrecognized by Google Test.
6157 class CurrentTestInfoTest : public Test {
6159 // Tests that current_test_info() returns NULL before the first test in
6160 // the test case is run.
6169 // Tests that current_test_info() returns NULL after the last test in
6170 // the test case has run.
6180 // test by checking the expected test name against the actual one.
6185 << "There is a test running so we should have a valid TestInfo.";
6187 << "Expected the name of the currently running test case.";
6189 << "Expected the name of the currently running test.";
6193 // test by checking the expected test name against the actual one. We
6194 // use this test to see that the TestInfo object actually changed from
6200 << "There is a test running so we should have a valid TestInfo.";
6202 << "Expected the name of the currently running test case.";
6204 << "Expected the name of the currently running test.";
6209 // These two lines test that we can define tests in a namespace that
6214 // Makes sure that TEST knows to use ::testing::Test instead of
6215 // ::my_namespace::testing::Test.
6216 class Test {};
6228 TEST(NestedTestingNamespaceTest, Success) {
6233 TEST(NestedTestingNamespaceTest, Failure) {
6243 // No tests are based on this fixture; the test "passes" if it compiles
6245 class ProtectedFixtureMethodsTest : public Test {
6248 Test::SetUp();
6251 Test::TearDown();
6257 TEST(StreamingAssertionsTest, Unconditional) {
6270 TEST(StreamingAssertionsTest, Truth) {
6279 TEST(StreamingAssertionsTest, Truth2) {
6293 TEST(StreamingAssertionsTest, IntegerEquals) {
6302 TEST(StreamingAssertionsTest, IntegerLessThan) {
6311 TEST(StreamingAssertionsTest, StringsEqual) {
6320 TEST(StreamingAssertionsTest, StringsNotEqual) {
6329 TEST(StreamingAssertionsTest, StringsEqualIgnoringCase) {
6338 TEST(StreamingAssertionsTest, StringNotEqualIgnoringCase) {
6347 TEST(StreamingAssertionsTest, FloatingPointEquals) {
6358 TEST(StreamingAssertionsTest, Throw) {
6367 TEST(StreamingAssertionsTest, NoThrow) {
6376 TEST(StreamingAssertionsTest, AnyThrow) {
6387 // Tests that Google Test correctly decides whether to use colors in the output.
6389 TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsYes) {
6401 TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsAliasOfYes) {
6414 TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsNo) {
6426 TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsInvalid) {
6439 TEST(ColoredOutputTest, UsesColorsWhenStdoutIsTty) {
6447 TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) {
6511 TEST(StaticAssertTypeEqTest, WorksInClass) {
6519 TEST(StaticAssertTypeEqTest, CompilesForEqualTypes) {
6524 TEST(GetCurrentOsStackTraceExceptTopTest, ReturnsTheStackTrace) {
6527 // We don't have a stack walker in Google Test yet.
6532 TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsNoFailure) {
6538 TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsOnlyFatalFailure) {
6545 TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereIsNonfatalFailure) {
6552 TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures) {
6560 // A wrapper for calling HasNonfatalFailure outside of a test body.
6562 return testing::Test::HasNonfatalFailure();
6565 TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody) {
6569 TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody2) {
6576 TEST(HasFailureTest, ReturnsFalseWhenThereIsNoFailure) {
6580 TEST(HasFailureTest, ReturnsTrueWhenThereIsFatalFailure) {
6587 TEST(HasFailureTest, ReturnsTrueWhenThereIsNonfatalFailure) {
6594 TEST(HasFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures) {
6602 // A wrapper for calling HasFailure outside of a test body.
6603 static bool HasFailureHelper() { return testing::Test::HasFailure(); }
6605 TEST(HasFailureTest, WorksOutsideOfTestBody) {
6609 TEST(HasFailureTest, WorksOutsideOfTestBody2) {
6640 TEST(TestEventListenersTest, ConstructionWorks) {
6650 TEST(TestEventListenersTest, DestructionWorks) {
6676 TEST(TestEventListenersTest, Append) {
6730 TEST(EventListenerTest, AppendKeepsOrder) {
6771 TEST(TestEventListenersTest, Release) {
6776 // test ends.
6792 TEST(EventListenerTest, SuppressEventForwarding) {
6806 // Tests that events generated by Google Test are not forwarded in
6807 // death test subprocesses.
6808 TEST(EventListenerDeathTest, EventsNotForwardedInDeathTestSubprecesses) {
6818 TEST(EventListenerTest, default_result_printer) {
6849 TEST(EventListenerTest, RemovingDefaultResultPrinterWorks) {
6854 // test ends.
6877 TEST(EventListenerTest, default_xml_generator) {
6908 TEST(EventListenerTest, RemovingDefaultXmlGeneratorWorks) {
6913 // test ends.
6934 // some of the macros work. We don't test them thoroughly as that
6938 GTEST_TEST(AlternativeNameTest, Works) { // GTEST_TEST is the same as TEST.
6989 TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) {
6997 TEST(IsAProtocolMessageTest, ValueIsTrueWhenTypeIsAProtocolMessage) {
7004 TEST(IsAProtocolMessageTest, ValueIsFalseWhenTypeIsNotAProtocolMessage) {
7011 TEST(CompileAssertTypesEqual, CompilesWhenTypesAreEqual) {
7017 TEST(RemoveReferenceTest, DoesNotAffectNonReferenceType) {
7023 TEST(RemoveReferenceTest, RemovesReference) {
7035 TEST(RemoveReferenceTest, MacroVersion) {
7042 TEST(RemoveConstTest, DoesNotAffectNonConstType) {
7048 TEST(RemoveConstTest, RemovesConst) {
7061 TEST(RemoveConstTest, MacroVersion) {
7074 TEST(RemoveReferenceToConstTest, Works) {
7083 TEST(AddReferenceTest, DoesNotAffectReferenceType) {
7089 TEST(AddReferenceTest, AddsReference) {
7101 TEST(AddReferenceTest, MacroVersion) {
7113 TEST(GTestReferenceToConstTest, Works) {
7121 TEST(ImplicitlyConvertibleTest, ValueIsCompileTimeConstant) {
7129 TEST(ImplicitlyConvertibleTest, ValueIsTrueWhenConvertible) {
7142 TEST(ImplicitlyConvertibleTest, ValueIsFalseWhenNotConvertible) {
7154 TEST(IsContainerTestTest, WorksForNonContainer) {
7160 TEST(IsContainerTestTest, WorksForContainer) {
7169 TEST(ArrayEqTest, WorksForDegeneratedArrays) {
7174 TEST(ArrayEqTest, WorksForOneDimensionalArrays) {
7185 TEST(ArrayEqTest, WorksForTwoDimensionalArrays) {
7199 TEST(ArrayAwareFindTest, WorksForOneDimensionalArray) {
7205 TEST(ArrayAwareFindTest, WorksForTwoDimensionalArray) {
7216 TEST(CopyArrayTest, WorksForDegeneratedArrays) {
7222 TEST(CopyArrayTest, WorksForOneDimensionalArrays) {
7235 TEST(CopyArrayTest, WorksForTwoDimensionalArrays) {
7250 TEST(NativeArrayTest, ConstructorFromArrayWorks) {
7257 TEST(NativeArrayTest, CreatesAndDeletesCopyOfArrayWhenAskedTo) {
7272 TEST(NativeArrayTest, TypeMembersAreCorrect) {
7280 TEST(NativeArrayTest, MethodsWork) {
7306 TEST(NativeArrayTest, WorksForTwoDimensionalArray) {
7315 TEST(SkipPrefixTest, SkipsWhenPrefixMatches) {
7327 TEST(SkipPrefixTest, DoesNotSkipWhenPrefixDoesNotMatch) {