37 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
38 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
44 # include <sys/types.h>
45 # include <sys/wait.h>
47 #endif // GTEST_OS_LINUX
49 #if GTEST_HAS_EXCEPTIONS
62 #include <type_traits>
78 #define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
79 #define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
90 #define GTEST_STRINGIFY_HELPER_(name, ...) #name
91 #define GTEST_STRINGIFY_(...) GTEST_STRINGIFY_HELPER_(__VA_ARGS__, )
101 class AssertionResult;
105 class TestPartResult;
108 template <
typename T>
132 template <
typename T,
140 const std::string& gtest_msg,
const Message& user_msg);
142 #if GTEST_HAS_EXCEPTIONS
153 class
GTEST_API_ GoogleTestFailureException : public ::std::runtime_error {
155 explicit GoogleTestFailureException(
const TestPartResult& failure);
160 #endif // GTEST_HAS_EXCEPTIONS
162 namespace edit_distance {
170 const std::vector<size_t>& left,
const std::vector<size_t>& right);
174 const std::vector<std::string>& left,
175 const std::vector<std::string>& right);
179 const std::vector<std::string>& right,
189 const std::string& right,
190 size_t* total_line_count);
208 const char* actual_expression,
209 const std::string& expected_value,
210 const std::string& actual_value,
215 const AssertionResult& assertion_result,
216 const char* expression_text,
217 const char* actual_predicate_value,
218 const char* expected_predicate_value);
249 template <
typename RawType>
263 std::numeric_limits<RawType>::digits - 1;
317 static RawType
Max();
393 return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
419 template <
typename T>
428 template <
typename T>
434 template <
typename T>
469 template <
class TestClass>
481 GTEST_API_ AssertionResult IsHRESULTSuccess(
const char* expr,
483 GTEST_API_ AssertionResult IsHRESULTFailure(
const char* expr,
486 #endif // GTEST_OS_WINDOWS
508 return a == def ?
nullptr :
a;
511 template <
typename T>
519 typename std::conditional<sizeof(T) != 0, ::testing::Test, void>::type;
529 <<
"Test can not provide both SetUpTestSuite and SetUpTestCase, please "
530 "make sure there is only one present at "
531 << filename <<
":" << line_num;
533 return test_case_fp !=
nullptr ? test_case_fp : test_suite_fp;
544 <<
"Test can not provide both TearDownTestSuite and TearDownTestCase,"
545 " please make sure there is only one present at"
546 << filename <<
":" << line_num;
548 return test_case_fp !=
nullptr ? test_case_fp : test_suite_fp;
571 const char* test_suite_name,
const char* name,
const char* type_param,
572 const char* value_param, CodeLocation code_location,
581 #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
589 TypedTestSuitePState() : registered_(
false) {}
594 bool AddTestName(
const char* file,
int line,
const char* case_name,
595 const char* test_name) {
598 "%s Test %s must be defined before "
599 "REGISTER_TYPED_TEST_SUITE_P(%s, ...).\n",
604 registered_tests_.insert(
605 ::std::make_pair(test_name, CodeLocation(file, line)));
609 bool TestExists(
const std::string& test_name)
const {
610 return registered_tests_.count(test_name) > 0;
613 const CodeLocation& GetCodeLocation(
const std::string& test_name)
const {
614 RegisteredTestsMap::const_iterator it = registered_tests_.find(test_name);
622 const char* VerifyRegisteredTestNames(
const char* test_suite_name,
623 const char* file,
int line,
624 const char* registered_tests);
627 typedef ::std::map<std::string, CodeLocation> RegisteredTestsMap;
630 RegisteredTestsMap registered_tests_;
634 #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
635 using TypedTestCasePState = TypedTestSuitePState;
636 #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
642 inline const
char* SkipComma(const
char* str) {
643 const char* comma = strchr(str,
',');
644 if (comma ==
nullptr) {
653 inline std::string GetPrefixUntilComma(
const char* str) {
654 const char* comma = strchr(str,
',');
655 return comma ==
nullptr ? str : std::string(str, comma);
660 void SplitString(const ::std::string& str,
char delimiter,
661 ::std::vector< ::std::string>* dest);
665 struct DefaultNameGenerator {
666 template <
typename T>
667 static std::string GetName(
int i) {
672 template <
typename Prov
ided = DefaultNameGenerator>
673 struct NameGeneratorSelector {
674 typedef Provided type;
677 template <
typename NameGenerator>
678 void GenerateNamesRecursively(internal::None, std::vector<std::string>*,
int) {}
680 template <
typename NameGenerator,
typename Types>
681 void GenerateNamesRecursively(
Types, std::vector<std::string>* result,
int i) {
682 result->push_back(NameGenerator::template GetName<typename Types::Head>(i));
683 GenerateNamesRecursively<NameGenerator>(
typename Types::Tail(), result,
687 template <
typename NameGenerator,
typename Types>
688 std::vector<std::string> GenerateNames() {
689 std::vector<std::string> result;
690 GenerateNamesRecursively<NameGenerator>(
Types(), &result, 0);
701 template <GTEST_TEMPLATE_ Fixture,
class TestSel,
typename Types>
702 class TypeParameterizedTest {
708 static bool Register(
const char* prefix,
const CodeLocation& code_location,
709 const char* case_name,
const char* test_names,
int index,
710 const std::vector<std::string>& type_names =
711 GenerateNames<DefaultNameGenerator, Types>()) {
712 typedef typename Types::Head Type;
714 typedef typename GTEST_BIND_(TestSel, Type) TestClass;
719 (std::
string(prefix) + (prefix[0] == '\0' ? "" : "/") + case_name +
720 "/" + type_names[static_cast<
size_t>(index)])
725 code_location,
GetTypeId<FixtureClass>(),
726 SuiteApiResolver<TestClass>::GetSetUpCaseOrSuite(
727 code_location.file.c_str(), code_location.line),
728 SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(
729 code_location.file.c_str(), code_location.line),
730 new TestFactoryImpl<TestClass>);
733 return TypeParameterizedTest<
Fixture, TestSel,
734 typename
Types::Tail>::Register(prefix,
744 template <GTEST_TEMPLATE_ Fixture, class TestSel>
745 class TypeParameterizedTest<Fixture, TestSel, internal::None> {
747 static bool Register(
const char* ,
const CodeLocation&,
748 const char* ,
const char* ,
750 const std::vector<std::string>& =
751 std::vector<std::string>() ) {
757 CodeLocation code_location);
759 const char* case_name);
765 template <GTEST_TEMPLATE_ Fixture,
typename Tests,
typename Types>
766 class TypeParameterizedTestSuite {
768 static bool Register(
const char* prefix, CodeLocation code_location,
769 const TypedTestSuitePState* state,
const char* case_name,
770 const char* test_names,
771 const std::vector<std::string>& type_names =
772 GenerateNames<DefaultNameGenerator, Types>()) {
775 GetPrefixUntilComma(test_names));
776 if (!state->TestExists(test_name)) {
777 fprintf(stderr,
"Failed to get code location for test %s.%s at %s.",
778 case_name, test_name.c_str(),
780 code_location.line).c_str());
784 const CodeLocation& test_location = state->GetCodeLocation(test_name);
786 typedef typename Tests::Head Head;
789 TypeParameterizedTest<Fixture, Head, Types>::Register(
790 prefix, test_location, case_name, test_names, 0, type_names);
793 return TypeParameterizedTestSuite<Fixture,
typename Tests::Tail,
794 Types>::Register(prefix, code_location,
796 SkipComma(test_names),
802 template <GTEST_TEMPLATE_ Fixture,
typename Types>
803 class TypeParameterizedTestSuite<Fixture, internal::None,
Types> {
805 static bool Register(
const char* ,
const CodeLocation&,
806 const TypedTestSuitePState* ,
807 const char* ,
const char* ,
808 const std::vector<std::string>& =
809 std::vector<std::string>() ) {
814 #endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
827 UnitTest* unit_test,
int skip_count);
843 operator bool()
const {
return true; }
853 explicit operator bool()
const {
return true; }
864 static const uint32_t kMaxRange = 1u << 31;
866 explicit Random(uint32_t seed) : state_(seed) {}
868 void Reseed(uint32_t seed) { state_ = seed; }
872 uint32_t Generate(uint32_t range);
880 #define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
881 typename std::remove_const<typename std::remove_reference<T>::type>::type
885 template <
typename T>
887 :
public std::is_convertible<const T*, const ::proto2::MessageLite*> {};
915 class Iterator = decltype(::std::declval<const C&>().begin()),
916 class = decltype(::std::declval<const C&>().end()),
917 class = decltype(++::std::declval<Iterator&>()),
918 class = decltype(*::std::declval<Iterator>()),
919 class =
typename C::const_iterator>
932 template <
typename T>
935 template <
typename U>
936 static char test(
typename U::hasher*,
typename U::reverse_iterator*);
937 template <
typename U>
938 static int test(
typename U::hasher*, ...);
939 template <
typename U>
940 static char test(...);
943 static const bool value =
sizeof(test<T>(
nullptr,
nullptr)) ==
sizeof(int);
946 template <
typename T>
949 template <
typename C,
950 bool =
sizeof(IsContainerTest<C>(0)) ==
sizeof(
IsContainer)>
953 template <
typename C>
960 template <
typename C>
962 using value_type = decltype(*std::declval<typename C::const_iterator>());
964 std::is_same<
typename std::remove_const<
965 typename std::remove_reference<value_type>::type>
::type,
975 template <
typename C>
984 template <
typename T,
typename U>
985 bool ArrayEq(
const T* lhs,
size_t size,
const U* rhs);
988 template <
typename T,
typename U>
989 inline bool ArrayEq(
const T& lhs,
const U& rhs) {
return lhs == rhs; }
992 template <
typename T,
typename U,
size_t N>
993 inline bool ArrayEq(
const T(&lhs)[
N],
const U(&rhs)[N]) {
1000 template <
typename T,
typename U>
1001 bool ArrayEq(
const T* lhs,
size_t size,
const U* rhs) {
1002 for (
size_t i = 0; i != size; i++) {
1011 template <
typename Iter,
typename Element>
1013 for (Iter it = begin; it != end; ++it) {
1024 template <
typename T,
typename U>
1025 void CopyArray(
const T* from,
size_t size, U* to);
1028 template <
typename T,
typename U>
1032 template <
typename T,
typename U,
size_t N>
1040 template <
typename T,
typename U>
1042 for (
size_t i = 0; i != size; i++) {
1062 template <
typename Element>
1072 InitRef(array, count);
1077 InitCopy(array, count);
1095 return size() == rhs.
size() &&
1102 "Type must not be a reference");
1106 Element*
const copy =
new Element[a_size];
1114 void InitRef(
const Element* array,
size_t a_size) {
1126 template <
size_t... Is>
1132 template <
bool plus_one,
typename T,
size_t sizeofT>
1134 template <
size_t... I,
size_t sizeofT>
1138 template <
size_t... I,
size_t sizeofT>
1147 :
DoubleSequence<N % 2 == 1, typename MakeIndexSequence<N / 2>::type,
1160 template <
size_t... I>
1166 template <
typename R>
1170 template <
size_t N,
typename...
T>
1174 static_cast<T (*)()
>(
nullptr)...));
1177 template <
typename...
T>
1180 template <
typename Derived,
size_t I>
1183 template <
typename...
T,
size_t I>
1191 template <
typename Derived,
typename Idx>
1194 template <
size_t... Idx,
typename...
T>
1212 template <
typename...
T>
1214 :
private FlatTupleBase<FlatTuple<T...>,
1215 typename MakeIndexSequence<sizeof...(T)>::type> {
1216 using Indices =
typename FlatTupleBase<
1237 "INSTANTIATE_TEST_CASE_P is deprecated, please use "
1238 "INSTANTIATE_TEST_SUITE_P")
1239 constexpr
bool InstantiateTestCase_P_IsDeprecated() {
return true; }
1242 "TYPED_TEST_CASE_P is deprecated, please use "
1243 "TYPED_TEST_SUITE_P")
1244 constexpr
bool TypedTestCase_P_IsDeprecated() {
return true; }
1247 "TYPED_TEST_CASE is deprecated, please use "
1249 constexpr
bool TypedTestCaseIsDeprecated() {
return true; }
1252 "REGISTER_TYPED_TEST_CASE_P is deprecated, please use "
1253 "REGISTER_TYPED_TEST_SUITE_P")
1254 constexpr
bool RegisterTypedTestCase_P_IsDeprecated() {
return true; }
1257 "INSTANTIATE_TYPED_TEST_CASE_P is deprecated, please use "
1258 "INSTANTIATE_TYPED_TEST_SUITE_P")
1259 constexpr
bool InstantiateTypedTestCase_P_IsDeprecated() {
return true; }
1264 #define GTEST_MESSAGE_AT_(file, line, message, result_type) \
1265 ::testing::internal::AssertHelper(result_type, file, line, message) \
1266 = ::testing::Message()
1268 #define GTEST_MESSAGE_(message, result_type) \
1269 GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
1271 #define GTEST_FATAL_FAILURE_(message) \
1272 return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
1274 #define GTEST_NONFATAL_FAILURE_(message) \
1275 GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
1277 #define GTEST_SUCCESS_(message) \
1278 GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
1280 #define GTEST_SKIP_(message) \
1281 return GTEST_MESSAGE_(message, ::testing::TestPartResult::kSkip)
1288 #define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
1289 if (::testing::internal::AlwaysTrue()) { \
1292 static_assert(true, "") // User must have a semicolon after expansion.
1294 #if GTEST_HAS_EXCEPTIONS
1297 namespace internal {
1301 const char* what()
const noexcept {
1302 return "this exception should never be thrown";
1311 #define GTEST_EXCEPTION_TYPE_(e) ::testing::internal::GetTypeName(typeid(e))
1313 #else // GTEST_HAS_RTTI
1315 #define GTEST_EXCEPTION_TYPE_(e) \
1316 std::string { "an std::exception-derived error" }
1318 #endif // GTEST_HAS_RTTI
1320 #define GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception) \
1321 catch (typename std::conditional< \
1322 std::is_same<typename std::remove_cv<typename std::remove_reference< \
1323 expected_exception>::type>::type, \
1324 std::exception>::value, \
1325 const ::testing::internal::NeverThrown&, const std::exception&>::type \
1327 gtest_msg.value = "Expected: " #statement \
1328 " throws an exception of type " #expected_exception \
1329 ".\n Actual: it throws "; \
1330 gtest_msg.value += GTEST_EXCEPTION_TYPE_(e); \
1331 gtest_msg.value += " with description \""; \
1332 gtest_msg.value += e.what(); \
1333 gtest_msg.value += "\"."; \
1334 goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
1337 #else // GTEST_HAS_EXCEPTIONS
1339 #define GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception)
1341 #endif // GTEST_HAS_EXCEPTIONS
1343 #define GTEST_TEST_THROW_(statement, expected_exception, fail) \
1344 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1345 if (::testing::internal::TrueWithString gtest_msg{}) { \
1346 bool gtest_caught_expected = false; \
1348 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
1349 } catch (expected_exception const&) { \
1350 gtest_caught_expected = true; \
1352 GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception) \
1354 gtest_msg.value = "Expected: " #statement \
1355 " throws an exception of type " #expected_exception \
1356 ".\n Actual: it throws a different type."; \
1357 goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
1359 if (!gtest_caught_expected) { \
1360 gtest_msg.value = "Expected: " #statement \
1361 " throws an exception of type " #expected_exception \
1362 ".\n Actual: it throws nothing."; \
1363 goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
1366 GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__) \
1367 : fail(gtest_msg.value.c_str())
1369 #if GTEST_HAS_EXCEPTIONS
1371 #define GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_() \
1372 catch (std::exception const& e) { \
1373 gtest_msg.value = "it throws "; \
1374 gtest_msg.value += GTEST_EXCEPTION_TYPE_(e); \
1375 gtest_msg.value += " with description \""; \
1376 gtest_msg.value += e.what(); \
1377 gtest_msg.value += "\"."; \
1378 goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
1381 #else // GTEST_HAS_EXCEPTIONS
1383 #define GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_()
1385 #endif // GTEST_HAS_EXCEPTIONS
1387 #define GTEST_TEST_NO_THROW_(statement, fail) \
1388 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1389 if (::testing::internal::TrueWithString gtest_msg{}) { \
1391 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
1393 GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_() \
1395 gtest_msg.value = "it throws."; \
1396 goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
1399 GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
1400 fail(("Expected: " #statement " doesn't throw an exception.\n" \
1401 " Actual: " + gtest_msg.value).c_str())
1403 #define GTEST_TEST_ANY_THROW_(statement, fail) \
1404 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1405 if (::testing::internal::AlwaysTrue()) { \
1406 bool gtest_caught_any = false; \
1408 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
1411 gtest_caught_any = true; \
1413 if (!gtest_caught_any) { \
1414 goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
1417 GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
1418 fail("Expected: " #statement " throws an exception.\n" \
1419 " Actual: it doesn't.")
1425 #define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
1426 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1427 if (const ::testing::AssertionResult gtest_ar_ = \
1428 ::testing::AssertionResult(expression)) \
1431 fail(::testing::internal::GetBoolAssertionFailureMessage(\
1432 gtest_ar_, text, #actual, #expected).c_str())
1434 #define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
1435 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1436 if (::testing::internal::AlwaysTrue()) { \
1437 ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
1438 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
1439 if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
1440 goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
1443 GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
1444 fail("Expected: " #statement " doesn't generate new fatal " \
1445 "failures in the current thread.\n" \
1446 " Actual: it does.")
1449 #define GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
1450 test_suite_name##_##test_name##_Test
1453 #define GTEST_TEST_(test_suite_name, test_name, parent_class, parent_id) \
1454 static_assert(sizeof(GTEST_STRINGIFY_(test_suite_name)) > 1, \
1455 "test_suite_name must not be empty"); \
1456 static_assert(sizeof(GTEST_STRINGIFY_(test_name)) > 1, \
1457 "test_name must not be empty"); \
1458 class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
1459 : public parent_class { \
1461 GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {} \
1462 ~GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() override = default; \
1463 GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
1465 GTEST_DISALLOW_MOVE_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
1469 void TestBody() override; \
1470 static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
1473 ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_suite_name, \
1474 test_name)::test_info_ = \
1475 ::testing::internal::MakeAndRegisterTestInfo( \
1476 #test_suite_name, #test_name, nullptr, nullptr, \
1477 ::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
1478 ::testing::internal::SuiteApiResolver< \
1479 parent_class>::GetSetUpCaseOrSuite(__FILE__, __LINE__), \
1480 ::testing::internal::SuiteApiResolver< \
1481 parent_class>::GetTearDownCaseOrSuite(__FILE__, __LINE__), \
1482 new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \
1483 test_suite_name, test_name)>); \
1484 void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody()
1486 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
GTEST_INTERNAL_DEPRECATED("INSTANTIATE_TEST_CASE_P is deprecated, please use ""INSTANTIATE_TEST_SUITE_P") const expr bool InstantiateTestCase_P_IsDeprecated()
bool operator==(const NativeArray &rhs) const
CodeLocation(const std::string &a_file, int a_line)
static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char *filename, int line_num)
static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1, const Bits &sam2)
static void SetUpTestCase()
GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(UnitTest *unit_test, int skip_count)
Bits exponent_bits() const
virtual ~TestFactoryBase()
static const size_t kMaxUlps
static RawType Infinity()
GTEST_API_ std::vector< EditType > CalculateOptimalEdits(const std::vector< size_t > &left, const std::vector< size_t > &right)
IsContainer IsContainerTest(int)
#define GTEST_DISABLE_MSC_WARNINGS_POP_()
static RawType ReinterpretBits(const Bits bits)
::std::string PrintToString(const T &value)
auto Apply(F &&f, Tuple &&args) -> decltype(ApplyImpl(std::forward< F >(f), std::forward< Tuple >(args), MakeIndexSequence< std::tuple_size< typename std::remove_reference< Tuple >::type >::value >()))
virtual Test * CreateTest()=0
typename std::conditional< sizeof(T)!=0,::testing::Test, void >::type Test
const Element * const_iterator
GTEST_API_::std::string FormatFileLocation(const char *file, int line)
void InitRef(const Element *array, size_t a_size)
void(NativeArray::* clone_)(const Element *, size_t)
FloatingPoint(const RawType &x)
static const size_t kExponentBitCount
void RegisterTypeParameterizedTestSuiteInstantiation(const char *case_name)
NativeArray(const Element *array, size_t count, RelationToSourceReference)
void SplitString(const ::std::string &str, char delimiter,::std::vector< ::std::string > *dest)
const_iterator begin() const
GTEST_API_ bool SkipPrefix(const char *prefix, const char **pstr)
TrueWithString(const std::string &str)
internal::ProxyTypeList< Ts...> Types
const ElemFromList< I, T...>::type & Get() const
typename FlatTupleBase< FlatTuple< T...>, typename MakeIndexSequence< sizeof...(T)>::type >::Indices Indices
void(*)( TearDownTestSuiteFunc)
std::string StreamableToString(const T &streamable)
ElemFromList< I, T...>::type & Get()
std::string GetTypeName()
bool ArrayEq(const T *lhs, size_t size, const U *rhs)
void(*)( SetUpTearDownSuiteFuncType)
FlatTupleElemBase(value_type t)
GTEST_API_ TypeId GetTestTypeId()
FloatingPoint< float > Float
FloatingPoint< double > Double
#define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
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)
#define GTEST_CHECK_(condition)
Test * CreateTest() override
typename ElemFromList< I, T...>::type value_type
static void TearDownTestSuite()
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase)
GTEST_API_ bool AlwaysTrue()
bool AlmostEquals(const FloatingPoint &rhs) const
NativeArray(const Element *array, size_t count, RelationToSourceCopy)
NativeArray(const NativeArray &rhs)
SetUpTearDownSuiteFuncType GetNotDefaultOrNull(SetUpTearDownSuiteFuncType a, SetUpTearDownSuiteFuncType def)
static Bits SignAndMagnitudeToBiased(const Bits &sam)
GTEST_API_ const char kStackTraceMarker[]
GTEST_API_ std::string AppendUserMessage(const std::string >est_msg, const Message &user_msg)
Bits fraction_bits() const
TrueWithString(const char *str)
GTEST_API_ std::string DiffStrings(const std::string &left, const std::string &right, size_t *total_line_count)
GTEST_API_ AssertionResult EqFailure(const char *expected_expression, const char *actual_expression, const std::string &expected_value, const std::string &actual_value, bool ignoring_case)
const Bits & bits() const
GTEST_API_ std::string GetBoolAssertionFailureMessage(const AssertionResult &assertion_result, const char *expression_text, const char *actual_predicate_value, const char *expected_predicate_value)
GTEST_API_ std::string CreateUnifiedDiff(const std::vector< std::string > &left, const std::vector< std::string > &right, size_t context=2)
static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite(const char *filename, int line_num)
static const size_t kFractionBitCount
TypeWithSize< sizeof(RawType)>::UInt Bits
const_iterator end() const
void RegisterTypeParameterizedTestSuite(const char *test_suite_name, CodeLocation code_location)
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
void InitCopy(const Element *array, size_t a_size)
std::is_same< typename std::remove_const< typename std::remove_reference< value_type >::type >::type, C > type
ConstCharPtr(const char *str)
void CopyArray(const T *from, size_t size, U *to)
static void SetUpTestSuite()
static const Bits kFractionBitMask
void Reseed(uint32_t seed)
void(*)( SetUpTestSuiteFunc)
Iter ArrayAwareFind(Iter begin, Iter end, const Element &elem)
decltype(ElemFromListImpl< typename MakeIndexSequence< N >::type >::Apply(static_cast< T(*)()>(nullptr)...)) type
decltype(*std::declval< typename C::const_iterator >()) value_type
static const Bits kSignBitMask
static const size_t kBitCount
ADvari & copy(const IndepADvar &x)
std::string StripTrailingSpaces(std::string str)
static void TearDownTestCase()
static const Bits kExponentBitMask