Lines Matching defs:testing
32 // The Google C++ Testing Framework (Google Test)
89 // The Google C++ Testing Framework (Google Test)
381 // Brings in definitions for functions used in the testing::internal::posix
1892 namespace testing {
1923 typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \
2147 ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
2169 if (::testing::internal::IsTrue(condition)) \
2236 ::testing::internal::ImplicitCast_<From*>(to);
2279 const ::std::vector<testing::internal::string>& GetInjectableArgvs();
2280 void SetInjectableArgvs(const ::std::vector<testing::internal::string>*
2284 extern ::std::vector<testing::internal::string> g_argvs;
2293 // testing Google Test's own constructs. Don't use it in user tests,
2307 // This class is only for testing Google Test's own constructs. Do not
2368 // Helper class for testing Google Test's multi-threading constructs.
2378 // These classes are only for testing Google Test's own constructs. Do
2488 extern ::testing::internal::MutexBase mutex
2497 ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
2661 extern ::testing::internal::Mutex mutex
2663 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
2799 // The testing::internal::posix namespace holds wrappers for common
3021 GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
3029 GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
3052 } // namespace testing
3105 // The Google C++ Testing Framework (Google Test)
3127 void operator<<(const testing::internal::Secret&, int);
3129 namespace testing {
3143 // testing::Message foo;
3193 // namespace, but not other namespaces, including the testing
3198 // assertions, testing::Message must access the custom << operator
3320 } // namespace testing
3354 // The Google C++ Testing Framework (Google Test)
3375 namespace testing {
3486 } // namespace testing
3532 namespace testing {
3691 } // namespace testing
3749 namespace testing {
7022 } // namespace testing
7040 namespace testing {
7094 (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
7107 // std::runtime_error inherits from std::exception, many testing
7386 // Returns the type ID of ::testing::Test. Always call this instead
7387 // of GetTypeId< ::testing::Test>() to get the type ID of
7388 // ::testing::Test, as the latter may give the wrong result due to a
7674 typename ::testing::internal::RemoveReference<T>::type
7705 typename ::testing::internal::RemoveConst<T>::type
7722 typename ::testing::internal::AddReference<T>::type
7983 } // namespace testing
7986 ::testing::internal::AssertHelper(result_type, file, line, message) \
7987 = ::testing::Message()
7993 return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
7996 GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
7999 GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
8005 if (::testing::internal::AlwaysTrue()) { statement; }
8009 if (::testing::internal::ConstCharPtr gtest_msg = "") { \
8035 if (::testing::internal::AlwaysTrue()) { \
8049 if (::testing::internal::AlwaysTrue()) { \
8071 if (const ::testing::AssertionResult gtest_ar_ = \
8072 ::testing::AssertionResult(expression)) \
8075 fail(::testing::internal::GetBoolAssertionFailureMessage(\
8080 if (::testing::internal::AlwaysTrue()) { \
8081 ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
8103 static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
8108 ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
8110 ::testing::internal::MakeAndRegisterTestInfo(\
8115 new ::testing::internal::TestFactoryImpl<\
8151 // The Google C++ Testing Framework (Google Test)
8191 // The Google C++ Testing Framework (Google Test)
8202 namespace testing {
8297 // Factory interface for death tests. May be mocked out for testing.
8327 ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
8330 death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
8332 death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
8345 if (::testing::internal::AlwaysTrue()) { \
8346 const ::testing::internal::RE& gtest_regex = (regex); \
8347 ::testing::internal::DeathTest* gtest_dt; \
8348 if (!::testing::internal::DeathTest::Create(#statement, >est_regex, \
8353 ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \
8356 case ::testing::internal::DeathTest::OVERSEE_TEST: \
8361 case ::testing::internal::DeathTest::EXECUTE_TEST: { \
8362 ::testing::internal::DeathTest::ReturnSentinel \
8365 gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
8374 fail(::testing::internal::DeathTest::LastMessage())
8384 if (::testing::internal::AlwaysTrue()) { \
8387 ::testing::Message()
8461 if (::testing::internal::AlwaysTrue()) { \
8465 } else if (::testing::internal::AlwaysFalse()) { \
8466 ::testing::internal::RE::PartialMatch(".*", (regex)); \
8470 ::testing::Message()
8475 } // namespace testing
8479 namespace testing {
8528 // ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
8616 ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
8621 EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
8650 // The death testing framework causes this to have interesting semantics,
8728 } // namespace testing
8767 // in Google C++ Testing Framework (Google Test)
8783 // class. It is usually derived from testing::TestWithParam<T> (see below for
8786 // TestWithParam<T> is itself derived from testing::Test. T can be any
8790 class FooTest : public ::testing::TestWithParam<const char*> {
8813 // are all in the testing namespace:
8885 // A parameterized test fixture must be derived from testing::Test and from
8886 // testing::WithParamInterface<T>, where T is the type of the parameter
8892 class BaseTest : public ::testing::Test {
8897 class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
9037 testing {
9065 // contention in production code, but is acceptable in a testing
9192 } // namespace testing
9226 // Google Test - The Google C++ Testing Framework
9231 // void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
9257 // std::string ::testing::PrintToString(const T& value);
9263 // void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
9268 // void ::testing::internal::UniversalPrint(const T& value, ostream*);
9298 namespace testing {
9342 const ::testing::internal::string short_str = value.ShortDebugString();
9343 const ::testing::internal::string pretty_str =
9401 } // namespace testing
9403 // This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
9412 // testing::internal2::operator<< appears as if it was declared in
9414 // ::testing_internal and ::testing::internal2, i.e. the global
9417 // testing::internal2::operator<< in case T doesn't come with a <<
9420 // We cannot write 'using ::testing::internal2::operator<<;', which
9422 using namespace ::testing::internal2; // NOLINT
9429 // 3. testing::internal2::operator<< (thanks to the using statement above).
9442 namespace testing {
9781 // conflicts with ::testing::internal::PrintTo in the body of the
9784 // By default, ::testing::internal::PrintTo() is used for printing
9790 // in ::testing::internal, it will be picked by the compiler in the
10045 } // namespace testing
10051 namespace testing {
10615 } // namespace testing
10674 namespace testing {
10680 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
15756 } // namespace testing
15764 namespace testing {
15876 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
15878 typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
16773 // It is useful when testing code that depends on Boolean flags. Combinations
16780 // class FlagDependentTest : public testing::TestWithParam<bool> {
16815 // : public testing::TestWithParam<tuple<const char*, Color> > {...};
16827 // : public testing::TestWithParam<tuple<bool, bool> > {
16955 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
16960 new ::testing::internal::TestMetaFactory< \
16974 ::testing::internal::ParamGenerator<test_case_name::ParamType> \
16977 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
16984 } // namespace testing
17020 // Google C++ Testing Framework definitions useful in production code.
17035 // class MyClassTest : public testing::Test {
17085 namespace testing {
17221 } // namespace testing
17267 // by a type. Remember to derive it from testing::Test.
17269 class FooTest : public testing::Test {
17280 typedef testing::Types<char, int, unsigned int> MyTypes;
17327 // by a type. Remember to derive it from testing::Test.
17329 class FooTest : public testing::Test {
17363 typedef testing::Types<char, int, unsigned int> MyTypes;
17387 typedef ::testing::internal::TypeList< Types >::type \
17400 ::testing::internal::TypeParameterizedTest< \
17402 ::testing::internal::TemplateSel< \
17441 static ::testing::internal::TypedTestCasePState \
17462 typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \
17473 ::testing::internal::TypeParameterizedTestCase<CaseName, \
17475 ::testing::internal::TypeList< Types >::type>::Register(\
17497 namespace testing {
17606 // testing::AssertionResult IsEven(int n) {
17608 // return testing::AssertionSuccess();
17610 // return testing::AssertionFailure() << n << " is odd";
17633 // testing::AssertionResult IsEven(int n) {
17635 // return testing::AssertionSuccess() << n << " is even";
17637 // return testing::AssertionFailure() << n << " is odd";
17657 // testing::AssertionResult IsEven(const char* expr, int n) {
17659 // return testing::AssertionSuccess();
17661 // return testing::AssertionFailure()
17750 // class FooTest : public testing::Test {
18722 // testing::Environment* const foo_env =
18723 // testing::AddGlobalTestEnvironment(new FooEnvironment);
18772 return ::testing::PrintToString(value);
18793 return ::testing::PrintToString(static_cast<const void*>(value)); \
18812 return ::testing::PrintToString(value); \
19180 // A value-parameterized class must inherit from both ::testing::Test and
19181 // ::testing::WithParamInterface. In most cases that just means inheriting
19182 // from ::testing::TestWithParam, but more complicated test hierarchies
19191 // class FooTest : public ::testing::TestWithParam<int> {
19211 // INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));
19249 // WithParamInterface, and can just inherit from ::testing::TestWithParam.
19283 ::testing::TestPartResult::kNonFatalFailure)
19303 // Macros for testing exceptions.
19394 // text, and returns a testing::AssertionResult. See the definition
19419 if (const ::testing::AssertionResult gtest_ar = (expression)) \
19449 GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \
19495 GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \
19548 GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \
19608 GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \
19675 GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \
19702 // Macros for testing equalities and inequalities.
19727 // with two C strings, you are testing how their locations in memory
19749 EXPECT_PRED_FORMAT2(::testing::internal:: \
19753 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual)
19755 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
19757 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
19759 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
19761 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
19764 ASSERT_PRED_FORMAT2(::testing::internal:: \
19768 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
19770 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
19772 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
19774 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
19776 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
19822 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
19824 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
19826 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
19828 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
19831 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
19833 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
19835 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
19837 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
19854 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
19858 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
19862 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
19866 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
19870 EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
19874 ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
19880 // EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);
19902 EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
19905 ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
19908 EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
19911 ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
19942 ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
19943 __FILE__, __LINE__, ::testing::Message() << (message))
19962 // void Bar() { testing::StaticAssertTypeEq<int, T>(); }
19998 // ::testing::Test>() here to get the type ID of testing::Test. This
20001 // ::testing::Test>() to return different values depending on whether
20008 ::testing::Test, ::testing::internal::GetTestTypeId())
20025 // class FooTest : public testing::Test {
20044 ::testing::internal::GetTypeId<test_fixture>())
20046 } // namespace testing
20059 return ::testing::UnitTest::GetInstance()->Run();