37 #endif // GTEST_OS_MAC
57 TEST(IsXDigitTest, WorksForNarrowAscii) {
70 TEST(IsXDigitTest, ReturnsFalseForNarrowNonAscii) {
75 TEST(IsXDigitTest, WorksForWideAscii) {
88 TEST(IsXDigitTest, ReturnsFalseForWideNonAscii) {
98 Base(
const Base&) =
default;
99 Base& operator=(
const Base&) =
default;
100 virtual ~Base() =
default;
107 class Derived :
public Base {
112 TEST(ImplicitCastTest, ConvertsPointers) {
114 EXPECT_TRUE(&derived == ::testing::internal::ImplicitCast_<Base*>(&derived));
117 TEST(ImplicitCastTest, CanUseInheritance) {
119 Base base = ::testing::internal::ImplicitCast_<Base>(derived);
120 EXPECT_EQ(derived.member(), base.member());
135 TEST(ImplicitCastTest, CanUseNonConstCastOperator) {
136 bool converted =
false;
138 Base base = ::testing::internal::ImplicitCast_<Base>(castable);
145 operator Base()
const {
154 TEST(ImplicitCastTest, CanUseConstCastOperatorOnConstValues) {
155 bool converted =
false;
157 Base base = ::testing::internal::ImplicitCast_<Base>(const_castable);
169 operator Base()
const {
179 TEST(ImplicitCastTest, CanSelectBetweenConstAndNonConstCasrAppropriately) {
180 bool converted =
false;
181 bool const_converted =
false;
183 Base base = ::testing::internal::ImplicitCast_<Base>(castable);
188 const_converted =
false;
190 base = ::testing::internal::ImplicitCast_<Base>(const_castable);
197 To(
bool* converted) { *converted =
true; }
200 TEST(ImplicitCastTest, CanUseImplicitConstructor) {
201 bool converted =
false;
202 To to = ::testing::internal::ImplicitCast_<To>(&converted);
209 #pragma GCC diagnostic push
210 #pragma GCC diagnostic ignored "-Wdangling-else"
211 #pragma GCC diagnostic ignored "-Wempty-body"
212 #pragma GCC diagnostic ignored "-Wpragmas"
214 TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) {
216 GTEST_CHECK_(
false) <<
"This should never be executed; "
217 "It's a compilation test only.";
230 #pragma GCC diagnostic pop
233 TEST(GtestCheckSyntaxTest, WorksWithSwitch) {
247 TEST(FormatFileLocationTest, FormatsFileLocation) {
252 TEST(FormatFileLocationTest, FormatsUnknownFile) {
258 TEST(FormatFileLocationTest, FormatsUknownLine) {
262 TEST(FormatFileLocationTest, FormatsUknownFileAndLine) {
267 TEST(FormatCompilerIndependentFileLocationTest, FormatsFileLocation) {
271 TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFile) {
276 TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownLine) {
280 TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFileAndLine) {
284 #if defined(GTEST_OS_LINUX) || defined(GTEST_OS_MAC) || \
285 defined(GTEST_OS_QNX) || defined(GTEST_OS_FUCHSIA) || \
286 defined(GTEST_OS_DRAGONFLY) || defined(GTEST_OS_FREEBSD) || \
287 defined(GTEST_OS_GNU_KFREEBSD) || defined(GTEST_OS_NETBSD) || \
288 defined(GTEST_OS_OPENBSD) || defined(GTEST_OS_GNU_HURD)
289 void* ThreadFunc(
void* data) {
296 TEST(GetThreadCountTest, ReturnsCorrectValue) {
297 size_t starting_count;
298 size_t thread_count_after_create;
299 size_t thread_count_after_join = 0;
305 for (
int attempt = 0; attempt < 20; ++attempt) {
309 internal::Mutex mutex;
314 ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE));
316 const int status = pthread_create(&thread_id, &attr, &ThreadFunc, &mutex);
317 ASSERT_EQ(0, pthread_attr_destroy(&attr));
324 ASSERT_EQ(0, pthread_join(thread_id, &dummy));
328 if (thread_count_after_create != starting_count + 1)
continue;
333 bool thread_count_matches =
false;
334 for (
int i = 0;
i < 5; ++
i) {
336 if (thread_count_after_join == starting_count) {
337 thread_count_matches =
true;
341 std::this_thread::sleep_for(std::chrono::milliseconds(100));
345 if (!thread_count_matches)
continue;
350 EXPECT_EQ(thread_count_after_create, starting_count + 1);
351 EXPECT_EQ(thread_count_after_join, starting_count);
354 TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads) {
357 #endif // GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX || GTEST_OS_FUCHSIA
359 TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) {
360 const bool a_false_condition =
false;
363 "googletest-port-test\\.cc\\(\\d+\\):"
364 #elif defined(GTEST_USES_POSIX_RE)
365 "googletest-port-test\\.cc:[0-9]+"
367 "googletest-port-test\\.cc:\\d+"
369 ".*a_false_condition.*Extra info.*";
375 #ifdef GTEST_HAS_DEATH_TEST
377 TEST(GtestCheckDeathTest, LivesSilentlyOnSuccess) {
381 ::std::cerr <<
"Success\n";
384 ::testing::ExitedWithCode(0),
"Success");
387 #endif // GTEST_HAS_DEATH_TEST
392 TEST(RegexEngineSelectionTest, SelectsCorrectRegexEngine) {
393 #ifdef GTEST_HAS_ABSL
395 #elif GTEST_HAS_POSIX_RE
402 #ifdef GTEST_USES_POSIX_RE
404 template <
typename Str>
414 TYPED_TEST(RETest, ImplicitConstructorWorks) {
415 const RE empty(TypeParam(
""));
418 const RE simple(TypeParam(
"hello"));
421 const RE normal(TypeParam(
".*(\\w+)"));
428 {
const RE invalid(TypeParam(
"?")); },
429 "\"?\" is not a valid POSIX Extended regular expression.");
434 const RE empty(TypeParam(
""));
438 const RE re(TypeParam(
"a.*z"));
447 const RE empty(TypeParam(
""));
448 EXPECT_TRUE(RE::PartialMatch(TypeParam(
""), empty));
449 EXPECT_TRUE(RE::PartialMatch(TypeParam(
"a"), empty));
451 const RE re(TypeParam(
"a.*z"));
452 EXPECT_TRUE(RE::PartialMatch(TypeParam(
"az"), re));
453 EXPECT_TRUE(RE::PartialMatch(TypeParam(
"axyz"), re));
454 EXPECT_TRUE(RE::PartialMatch(TypeParam(
"baz"), re));
455 EXPECT_TRUE(RE::PartialMatch(TypeParam(
"azy"), re));
459 #elif defined(GTEST_USES_SIMPLE_RE)
461 TEST(IsInSetTest, NulCharIsNotInAnySet) {
467 TEST(IsInSetTest, WorksForNonNulChars) {
475 TEST(IsAsciiDigitTest, IsFalseForNonDigit) {
484 TEST(IsAsciiDigitTest, IsTrueForDigit) {
491 TEST(IsAsciiPunctTest, IsFalseForNonPunct) {
499 TEST(IsAsciiPunctTest, IsTrueForPunct) {
500 for (
const char*
p =
"^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"; *
p;
p++) {
505 TEST(IsRepeatTest, IsFalseForNonRepeatChar) {
513 TEST(IsRepeatTest, IsTrueForRepeatChar) {
519 TEST(IsAsciiWhiteSpaceTest, IsFalseForNonWhiteSpace) {
527 TEST(IsAsciiWhiteSpaceTest, IsTrueForWhiteSpace) {
536 TEST(IsAsciiWordCharTest, IsFalseForNonWordChar) {
544 TEST(IsAsciiWordCharTest, IsTrueForLetter) {
551 TEST(IsAsciiWordCharTest, IsTrueForDigit) {
558 TEST(IsAsciiWordCharTest, IsTrueForUnderscore) {
562 TEST(IsValidEscapeTest, IsFalseForNonPrintable) {
567 TEST(IsValidEscapeTest, IsFalseForDigit) {
572 TEST(IsValidEscapeTest, IsFalseForWhiteSpace) {
577 TEST(IsValidEscapeTest, IsFalseForSomeLetter) {
582 TEST(IsValidEscapeTest, IsTrueForPunct) {
593 TEST(IsValidEscapeTest, IsTrueForSomeLetter) {
602 TEST(AtomMatchesCharTest, EscapedPunct) {
614 TEST(AtomMatchesCharTest, Escaped_d) {
623 TEST(AtomMatchesCharTest, Escaped_D) {
632 TEST(AtomMatchesCharTest, Escaped_s) {
643 TEST(AtomMatchesCharTest, Escaped_S) {
652 TEST(AtomMatchesCharTest, Escaped_w) {
664 TEST(AtomMatchesCharTest, Escaped_W) {
675 TEST(AtomMatchesCharTest, EscapedWhiteSpace) {
694 TEST(AtomMatchesCharTest, UnescapedDot) {
703 TEST(AtomMatchesCharTest, UnescapedChar) {
713 TEST(ValidateRegexTest, GeneratesFailureAndReturnsFalseForInvalid) {
715 "NULL is not a valid simple regular expression");
718 "Syntax error at index 1 in simple regular expression \"a\\\": ");
720 "'\\' cannot appear at the end");
722 "'\\' cannot appear at the end");
724 "invalid escape sequence \"\\h\"");
726 "'^' can only appear at the beginning");
728 "'^' can only appear at the beginning");
730 "'$' can only appear at the end");
732 "'$' can only appear at the end");
734 "'(' is unsupported");
736 "')' is unsupported");
738 "'[' is unsupported");
740 "'{' is unsupported");
742 "'?' can only follow a repeatable token");
744 "'*' can only follow a repeatable token");
746 "'+' can only follow a repeatable token");
749 TEST(ValidateRegexTest, ReturnsTrueForValid) {
757 EXPECT_TRUE(ValidateRegex(
"a\\^Z\\$\\(\\)\\|\\[\\]\\{\\}"));
760 TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrOne) {
761 EXPECT_FALSE(MatchRepetitionAndRegexAtHead(
false,
'a',
'?',
"a",
"ba"));
763 EXPECT_FALSE(MatchRepetitionAndRegexAtHead(
false,
'a',
'?',
"b",
"aab"));
766 EXPECT_TRUE(MatchRepetitionAndRegexAtHead(
false,
'a',
'?',
"b",
"ba"));
768 EXPECT_TRUE(MatchRepetitionAndRegexAtHead(
false,
'a',
'?',
"b",
"ab"));
769 EXPECT_TRUE(MatchRepetitionAndRegexAtHead(
false,
'#',
'?',
".",
"##"));
772 TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrMany) {
773 EXPECT_FALSE(MatchRepetitionAndRegexAtHead(
false,
'.',
'*',
"a$",
"baab"));
776 EXPECT_TRUE(MatchRepetitionAndRegexAtHead(
false,
'.',
'*',
"b",
"bc"));
778 EXPECT_TRUE(MatchRepetitionAndRegexAtHead(
false,
'.',
'*',
"b",
"abc"));
780 EXPECT_TRUE(MatchRepetitionAndRegexAtHead(
true,
'w',
'*',
"-",
"ab_1-g"));
783 TEST(MatchRepetitionAndRegexAtHeadTest, WorksForOneOrMany) {
784 EXPECT_FALSE(MatchRepetitionAndRegexAtHead(
false,
'.',
'+',
"a$",
"baab"));
786 EXPECT_FALSE(MatchRepetitionAndRegexAtHead(
false,
'.',
'+',
"b",
"bc"));
789 EXPECT_TRUE(MatchRepetitionAndRegexAtHead(
false,
'.',
'+',
"b",
"abc"));
791 EXPECT_TRUE(MatchRepetitionAndRegexAtHead(
true,
'w',
'+',
"-",
"ab_1-g"));
794 TEST(MatchRegexAtHeadTest, ReturnsTrueForEmptyRegex) {
799 TEST(MatchRegexAtHeadTest, WorksWhenDollarIsInRegex) {
806 TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithEscapeSequence) {
814 TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetition) {
823 TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetionOfEscapeSequence) {
833 TEST(MatchRegexAtHeadTest, MatchesSequentially) {
839 TEST(MatchRegexAnywhereTest, ReturnsFalseWhenStringIsNull) {
843 TEST(MatchRegexAnywhereTest, WorksWhenRegexStartsWithCaret) {
852 TEST(MatchRegexAnywhereTest, ReturnsFalseWhenNoMatch) {
854 EXPECT_FALSE(MatchRegexAnywhere(
"a.+a",
"--aa88888888"));
857 TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingPrefix) {
858 EXPECT_TRUE(MatchRegexAnywhere(
"\\w+",
"ab1_ - 5"));
860 EXPECT_TRUE(MatchRegexAnywhere(
"x.*ab?.*bc",
"xaaabc"));
863 TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingNonPrefix) {
864 EXPECT_TRUE(MatchRegexAnywhere(
"\\w+",
"$$$ ab1_ - 5"));
865 EXPECT_TRUE(MatchRegexAnywhere(
"\\.+=",
"= ...="));
869 TEST(RETest, ImplicitConstructorWorks) {
873 const RE simple(
"hello");
878 TEST(RETest, RejectsInvalidRegex) {
880 "NULL is not a valid simple regular expression");
883 "'(' is unsupported");
886 "'?' can only follow a repeatable token");
890 TEST(RETest, FullMatchWorks) {
906 TEST(RETest, PartialMatchWorks) {
919 #endif // GTEST_USES_POSIX_RE
921 #ifndef GTEST_OS_WINDOWS_MOBILE
923 TEST(CaptureTest, CapturesStdout) {
925 fprintf(stdout,
"abc");
929 fprintf(stdout,
"def%cghi",
'\0');
933 TEST(CaptureTest, CapturesStderr) {
935 fprintf(stderr,
"jkl");
939 fprintf(stderr,
"jkl%cmno",
'\0');
944 TEST(CaptureTest, CapturesStdoutAndStderr) {
947 fprintf(stdout,
"pqr");
948 fprintf(stderr,
"stu");
953 TEST(CaptureDeathTest, CannotReenterStdoutCapture) {
956 "Only one stdout capturer can exist at a time");
963 #endif // !GTEST_OS_WINDOWS_MOBILE
965 TEST(ThreadLocalTest, DefaultConstructorInitializesToDefaultValues) {
973 TEST(ThreadLocalTest, SingleParamConstructorInitializesToParam) {
988 TEST(ThreadLocalTest, ValueDefaultContructorIsNotRequiredForParamVersion) {
993 TEST(ThreadLocalTest, GetAndPointerReturnSameValue) {
999 thread_local_string.
set(
"foo");
1003 TEST(ThreadLocalTest, PointerAndConstPointerReturnSameValue) {
1006 thread_local_string;
1010 thread_local_string.
set(
"foo");
1014 #ifdef GTEST_IS_THREADSAFE
1016 void AddTwo(
int* param) { *param += 2; }
1018 TEST(ThreadWithParamTest, ConstructorExecutesThreadFunc) {
1020 ThreadWithParam<int*> thread(&AddTwo, &i,
nullptr);
1025 TEST(MutexDeathTest, AssertHeldShouldAssertWhenNotLocked) {
1037 TEST(MutexTest, AssertHeldShouldNotAssertWhenLocked) {
1043 class AtomicCounterWithMutex {
1045 explicit AtomicCounterWithMutex(Mutex* mutex)
1046 :
value_(0), mutex_(mutex), random_(42) {}
1055 #if GTEST_HAS_PTHREAD
1059 pthread_mutex_t memory_barrier_mutex;
1061 pthread_mutex_init(&memory_barrier_mutex,
nullptr));
1064 std::this_thread::sleep_for(
1065 std::chrono::milliseconds(random_.Generate(30)));
1069 #elif defined(GTEST_OS_WINDOWS)
1071 volatile LONG dummy = 0;
1072 ::InterlockedIncrement(&dummy);
1073 std::this_thread::sleep_for(
1074 std::chrono::milliseconds(random_.Generate(30)));
1075 ::InterlockedIncrement(&dummy);
1077 #error "Memory barrier not implemented on this platform."
1078 #endif // GTEST_HAS_PTHREAD
1086 Mutex*
const mutex_;
1090 void CountingThreadFunc(pair<AtomicCounterWithMutex*, int> param) {
1091 for (
int i = 0; i < param.second; ++
i) param.first->Increment();
1095 TEST(MutexTest, OnlyOneThreadCanLockAtATime) {
1097 AtomicCounterWithMutex locked_counter(&mutex);
1099 typedef ThreadWithParam<pair<AtomicCounterWithMutex*, int> > ThreadType;
1100 const int kCycleCount = 20;
1101 const int kThreadCount = 7;
1102 std::unique_ptr<ThreadType> counting_threads[kThreadCount];
1103 Notification threads_can_start;
1106 for (
int i = 0; i < kThreadCount; ++
i) {
1107 counting_threads[
i] = std::make_unique<ThreadType>(
1108 &CountingThreadFunc, make_pair(&locked_counter, kCycleCount),
1109 &threads_can_start);
1111 threads_can_start.Notify();
1112 for (
int i = 0; i < kThreadCount; ++
i) counting_threads[i]->Join();
1118 EXPECT_EQ(kCycleCount * kThreadCount, locked_counter.value());
1121 template <
typename T>
1122 void RunFromThread(
void(
func)(
T),
T param) {
1123 ThreadWithParam<T> thread(
func, param,
nullptr);
1127 void RetrieveThreadLocalValue(
1128 pair<ThreadLocal<std::string>*, std::string*> param) {
1129 *param.second = param.first->get();
1132 TEST(ThreadLocalTest, ParameterizedConstructorSetsDefault) {
1133 ThreadLocal<std::string> thread_local_string(
"foo");
1134 EXPECT_STREQ(
"foo", thread_local_string.get().c_str());
1136 thread_local_string.set(
"bar");
1137 EXPECT_STREQ(
"bar", thread_local_string.get().c_str());
1140 RunFromThread(&RetrieveThreadLocalValue,
1141 make_pair(&thread_local_string, &result));
1147 class DestructorCall {
1151 #ifdef GTEST_OS_WINDOWS
1152 wait_event_.Reset(::CreateEvent(NULL, TRUE, FALSE, NULL));
1157 bool CheckDestroyed()
const {
1158 #ifdef GTEST_OS_WINDOWS
1159 if (::WaitForSingleObject(wait_event_.Get(), 1000) != WAIT_OBJECT_0)
1165 void ReportDestroyed() {
1167 #ifdef GTEST_OS_WINDOWS
1168 ::SetEvent(wait_event_.Get());
1172 static std::vector<DestructorCall*>& List() {
return *list_; }
1174 static void ResetList() {
1175 for (
size_t i = 0; i < list_->size(); ++
i) {
1176 delete list_->at(i);
1183 #ifdef GTEST_OS_WINDOWS
1184 AutoHandle wait_event_;
1186 static std::vector<DestructorCall*>*
const list_;
1188 DestructorCall(
const DestructorCall&) =
delete;
1189 DestructorCall& operator=(
const DestructorCall&) =
delete;
1192 std::vector<DestructorCall*>*
const DestructorCall::list_ =
1193 new std::vector<DestructorCall*>;
1197 class DestructorTracker {
1199 DestructorTracker() :
index_(GetNewIndex()) {}
1200 DestructorTracker(
const DestructorTracker& )
1201 :
index_(GetNewIndex()) {}
1202 ~DestructorTracker() {
1205 DestructorCall::List()[
index_]->ReportDestroyed();
1209 static size_t GetNewIndex() {
1210 DestructorCall::List().push_back(
new DestructorCall);
1211 return DestructorCall::List().size() - 1;
1216 typedef ThreadLocal<DestructorTracker>* ThreadParam;
1218 void CallThreadLocalGet(ThreadParam thread_local_param) {
1219 thread_local_param->get();
1224 TEST(ThreadLocalTest, DestroysManagedObjectForOwnThreadWhenDying) {
1225 DestructorCall::ResetList();
1228 ThreadLocal<DestructorTracker> thread_local_tracker;
1229 ASSERT_EQ(0U, DestructorCall::List().size());
1232 thread_local_tracker.get();
1233 ASSERT_EQ(1U, DestructorCall::List().size());
1234 ASSERT_FALSE(DestructorCall::List()[0]->CheckDestroyed());
1238 ASSERT_EQ(1U, DestructorCall::List().size());
1239 EXPECT_TRUE(DestructorCall::List()[0]->CheckDestroyed());
1241 DestructorCall::ResetList();
1246 TEST(ThreadLocalTest, DestroysManagedObjectAtThreadExit) {
1247 DestructorCall::ResetList();
1250 ThreadLocal<DestructorTracker> thread_local_tracker;
1251 ASSERT_EQ(0U, DestructorCall::List().size());
1254 ThreadWithParam<ThreadParam> thread(&CallThreadLocalGet,
1255 &thread_local_tracker,
nullptr);
1260 ASSERT_EQ(1U, DestructorCall::List().size());
1264 ASSERT_EQ(1U, DestructorCall::List().size());
1265 EXPECT_TRUE(DestructorCall::List()[0]->CheckDestroyed());
1267 DestructorCall::ResetList();
1270 TEST(ThreadLocalTest, ThreadLocalMutationsAffectOnlyCurrentThread) {
1271 ThreadLocal<std::string> thread_local_string;
1272 thread_local_string.set(
"Foo");
1273 EXPECT_STREQ(
"Foo", thread_local_string.get().c_str());
1276 RunFromThread(&RetrieveThreadLocalValue,
1277 make_pair(&thread_local_string, &result));
1281 #endif // GTEST_IS_THREADSAFE
1283 #ifdef GTEST_OS_WINDOWS
1284 TEST(WindowsTypesTest, HANDLEIsVoidStar) {
1285 StaticAssertTypeEq<HANDLE, void*>();
1288 #if defined(GTEST_OS_WINDOWS_MINGW) && !defined(__MINGW64_VERSION_MAJOR)
1289 TEST(WindowsTypesTest, _CRITICAL_SECTIONIs_CRITICAL_SECTION) {
1290 StaticAssertTypeEq<CRITICAL_SECTION, _CRITICAL_SECTION>();
1293 TEST(WindowsTypesTest, CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION) {
1294 StaticAssertTypeEq<CRITICAL_SECTION, _RTL_CRITICAL_SECTION>();
1298 #endif // GTEST_OS_WINDOWS
#define EXPECT_DEATH_IF_SUPPORTED(statement, regex)
GTEST_API_ std::string GetCapturedStdout()
GTEST_API_ std::string GetCapturedStderr()
TYPED_TEST_SUITE(TestSuiteWithCommentTest, Types< int >)
#define EXPECT_PRED_FORMAT2(pred_format, v1, v2)
#define EXPECT_NONFATAL_FAILURE(statement, substr)
#define GTEST_USES_POSIX_RE
TYPED_TEST(TestSuiteWithCommentTest, Dummy)
GTEST_API_ size_t GetThreadCount()
#define ASSERT_EQ(val1, val2)
GTEST_API_ void CaptureStdout()
GTEST_API_::std::string FormatFileLocation(const char *file, int line)
#define EXPECT_PRED1(pred, v1)
#define GTEST_CHECK_(condition)
NoDefaultConstructor(const char *)
GTEST_API_ bool AlwaysTrue()
#define EXPECT_STREQ(s1, s2)
GTEST_API_ AssertionResult IsSubstring(const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
ConstCastable(bool *converted)
#define GTEST_CHECK_POSIX_SUCCESS_(posix_call)
ConstAndNonConstCastable(bool *converted, bool *const_converted)
GTEST_DISABLE_MSC_WARNINGS_POP_() GTEST_API_ GTEST_API_::std::string FormatCompilerIndependentFileLocation(const char *file, int line)
#define EXPECT_EQ(val1, val2)
GTEST_API_ void CaptureStderr()
const T func(int n, T *x)
#define EXPECT_TRUE(condition)
#define EXPECT_FALSE(condition)
Castable(bool *converted)
#define ASSERT_FALSE(condition)
TEST(IsXDigitTest, WorksForNarrowAscii)