67 {
68
69
70
71
72
73
75
76namespace internal {
77
78
79
81
82
83const char kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests";
84const char kBreakOnFailureFlag[] = "break_on_failure";
85const char kCatchExceptionsFlag[] = "catch_exceptions";
86const char kColorFlag[] = "color";
87const char kFailFast[] = "fail_fast";
88const char kFilterFlag[] = "filter";
89const char kListTestsFlag[] = "list_tests";
90const char kOutputFlag[] = "output";
91const char kBriefFlag[] = "brief";
92const char kPrintTimeFlag[] = "print_time";
93const char kPrintUTF8Flag[] = "print_utf8";
94const char kRandomSeedFlag[] = "random_seed";
95const char kRepeatFlag[] = "repeat";
96const char kShuffleFlag[] = "shuffle";
97const char kStackTraceDepthFlag[] = "stack_trace_depth";
98const char kStreamResultToFlag[] = "stream_result_to";
99const char kThrowOnFailureFlag[] = "throw_on_failure";
100const char kFlagfileFlag[] = "flagfile";
101
102
103const int kMaxRandomSeed = 99999;
104
105
106
108
109
111
112
114
115
117
118
119
120
121
123
124
125
126
127
129 const char* str,
const char* flag, int32_t*
value);
130
131
132
133inline int GetRandomSeedFromFlag(int32_t random_seed_flag) {
134 const unsigned int raw_seed = (random_seed_flag == 0) ?
136 static_cast<unsigned int>(random_seed_flag);
137
138
139
140 const int normalized_seed =
141 static_cast<int>((raw_seed - 1U) %
142 static_cast<unsigned int>(kMaxRandomSeed)) + 1;
143 return normalized_seed;
144}
145
146
147
148
149inline int GetNextRandomSeed(int seed) {
151 << "Invalid random seed " << seed << " - must be in [1, "
152 << kMaxRandomSeed << "].";
153 const int next_seed = seed + 1;
154 return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
155}
156
157
158
159class GTestFlagSaver {
160 public:
161
162 GTestFlagSaver() {
163 also_run_disabled_tests_ =
GTEST_FLAG(also_run_disabled_tests);
164 break_on_failure_ =
GTEST_FLAG(break_on_failure);
165 catch_exceptions_ =
GTEST_FLAG(catch_exceptions);
167 death_test_style_ =
GTEST_FLAG(death_test_style);
168 death_test_use_fork_ =
GTEST_FLAG(death_test_use_fork);
171 internal_run_death_test_ =
GTEST_FLAG(internal_run_death_test);
180 stack_trace_depth_ =
GTEST_FLAG(stack_trace_depth);
181 stream_result_to_ =
GTEST_FLAG(stream_result_to);
182 throw_on_failure_ =
GTEST_FLAG(throw_on_failure);
183 }
184
185
186 ~GTestFlagSaver() {
187 GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_;
188 GTEST_FLAG(break_on_failure) = break_on_failure_;
189 GTEST_FLAG(catch_exceptions) = catch_exceptions_;
191 GTEST_FLAG(death_test_style) = death_test_style_;
192 GTEST_FLAG(death_test_use_fork) = death_test_use_fork_;
195 GTEST_FLAG(internal_run_death_test) = internal_run_death_test_;
204 GTEST_FLAG(stack_trace_depth) = stack_trace_depth_;
205 GTEST_FLAG(stream_result_to) = stream_result_to_;
206 GTEST_FLAG(throw_on_failure) = throw_on_failure_;
207 }
208
209 private:
210
211 bool also_run_disabled_tests_;
212 bool break_on_failure_;
213 bool catch_exceptions_;
214 std::string color_;
215 std::string death_test_style_;
216 bool death_test_use_fork_;
217 bool fail_fast_;
218 std::string filter_;
219 std::string internal_run_death_test_;
220 bool list_tests_;
221 std::string output_;
222 bool brief_;
223 bool print_time_;
224 bool print_utf8_;
225 int32_t random_seed_;
226 int32_t repeat_;
227 bool shuffle_;
228 int32_t stack_trace_depth_;
229 std::string stream_result_to_;
230 bool throw_on_failure_;
232
233
234
235
236
237
238
240
241
242
243
244
245
246
247
248
249
250
251
252
253
255
256
257
258
259
261
262
263
264
265
266
267
269 const char* shard_index_str,
270 bool in_subprocess_for_death_test);
271
272
273
274
276
277
278
279
280
282 int total_shards, int shard_index, int test_id);
283
284
285
286
287
288template <class Container, typename Predicate>
289inline int CountIf(const Container& c, Predicate predicate) {
290
291
293 for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
294 if (predicate(*it))
296 }
298}
299
300
301template <class Container, typename Functor>
302void ForEach(const Container& c, Functor functor) {
303 std::for_each(c.begin(), c.end(), functor);
304}
305
306
307
308template <typename E>
309inline E GetElementOr(
const std::vector<E>& v,
int i, E default_value) {
310 return (i < 0 || i >= static_cast<int>(v.size())) ? default_value
311 : v[
static_cast<size_t>(
i)];
312}
313
314
315
316
317
318template <typename E>
319void ShuffleRange(internal::Random* random, int begin, int end,
320 std::vector<E>* v) {
321 const int size = static_cast<int>(v->size());
323 << "Invalid shuffle range start " << begin << ": must be in range [0, "
324 << size << "].";
326 << "Invalid shuffle range finish " << end << ": must be in range ["
327 << begin << ", " << size << "].";
328
329
330
331 for (int range_width = end - begin; range_width >= 2; range_width--) {
332 const int last_in_range = begin + range_width - 1;
333 const int selected =
334 begin +
335 static_cast<int>(random->Generate(static_cast<uint32_t>(range_width)));
336 std::swap((*v)[static_cast<size_t>(selected)],
337 (*v)[static_cast<size_t>(last_in_range)]);
338 }
339}
340
341
342template <typename E>
343inline void Shuffle(internal::Random* random, std::vector<E>* v) {
344 ShuffleRange(random, 0, static_cast<int>(v->size()), v);
345}
346
347
348
349template <typename T>
350static void Delete(T*
x) {
352}
353
354
355
356
357class TestPropertyKeyIs {
358 public:
359
360
361
362 explicit TestPropertyKeyIs(const std::string& key) : key_(key) {}
363
364
365 bool operator()(const TestProperty& test_property) const {
366 return test_property.key() == key_;
367 }
368
369 private:
370 std::string key_;
371};
372
373
374
375
376
377
378
379
380
381
382
384 public:
385
386
387
388 static std::string GetOutputFormat();
389
390
391
392
393 static std::string GetAbsolutePathToOutputFile();
394
395
396
397
398
399 static bool FilterMatchesTest(const std::string& test_suite_name,
400 const std::string& test_name);
401
402#if GTEST_OS_WINDOWS
403
404
405
406
407
408 static int GTestShouldProcessSEH(DWORD exception_code);
409#endif
410
411
412
413 static bool MatchesFilter(const std::string& name, const char* filter);
414};
415
416
417
419
420
421class OsStackTraceGetterInterface {
422 public:
423 OsStackTraceGetterInterface() {}
424 virtual ~OsStackTraceGetterInterface() {}
425
426
427
428
429
430
431
432 virtual std::string CurrentStackTrace(int max_depth, int skip_count) = 0;
433
434
435
436
437 virtual void UponLeavingGTest() = 0;
438
439
440
441 static const char* const kElidedFramesMarker;
442
443 private:
445};
446
447
448class OsStackTraceGetter : public OsStackTraceGetterInterface {
449 public:
450 OsStackTraceGetter() {}
451
452 std::string CurrentStackTrace(int max_depth, int skip_count) override;
453 void UponLeavingGTest() override;
454
455 private:
456#if GTEST_HAS_ABSL
457 Mutex mutex_;
458
459
460
461
462
463 void* caller_frame_ = nullptr;
464#endif
465
467};
468
469
470struct TraceInfo {
472 int line;
474};
475
476
477
478class DefaultGlobalTestPartResultReporter
479 : public TestPartResultReporterInterface {
480 public:
481 explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test);
482
483
484 void ReportTestPartResult(const TestPartResult& result) override;
485
486 private:
487 UnitTestImpl* const unit_test_;
488
490};
491
492
493
494class DefaultPerThreadTestPartResultReporter
495 : public TestPartResultReporterInterface {
496 public:
497 explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test);
498
499
500 void ReportTestPartResult(const TestPartResult& result) override;
501
502 private:
503 UnitTestImpl* const unit_test_;
504
506};
507
508
509
510
511
513 public:
514 explicit UnitTestImpl(UnitTest* parent);
515 virtual ~UnitTestImpl();
516
517
518
519
520
521
522
523
524
525 TestPartResultReporterInterface* GetGlobalTestPartResultReporter();
526
527
528 void SetGlobalTestPartResultReporter(
529 TestPartResultReporterInterface* reporter);
530
531
532 TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread();
533
534
535 void SetTestPartResultReporterForCurrentThread(
536 TestPartResultReporterInterface* reporter);
537
538
539 int successful_test_suite_count() const;
540
541
542 int failed_test_suite_count() const;
543
544
545 int total_test_suite_count() const;
546
547
548
549 int test_suite_to_run_count() const;
550
551
552 int successful_test_count() const;
553
554
555 int skipped_test_count() const;
556
557
558 int failed_test_count() const;
559
560
561 int reportable_disabled_test_count() const;
562
563
564 int disabled_test_count() const;
565
566
567 int reportable_test_count() const;
568
569
570 int total_test_count() const;
571
572
573 int test_to_run_count() const;
574
575
576
577 TimeInMillis start_timestamp()
const {
return start_timestamp_; }
578
579
580 TimeInMillis elapsed_time()
const {
return elapsed_time_; }
581
582
583
584 bool Passed() const { return !Failed(); }
585
586
587
588 bool Failed() const {
589 return failed_test_suite_count() > 0 || ad_hoc_test_result()->Failed();
590 }
591
592
593
594 const TestSuite* GetTestSuite(
int i)
const {
595 const int index = GetElementOr(test_suite_indices_,
i, -1);
596 return index < 0 ? nullptr : test_suites_[static_cast<size_t>(
i)];
597 }
598
599
600#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
601 const TestCase* GetTestCase(
int i)
const {
return GetTestSuite(
i); }
602#endif
603
604
605
606 TestSuite* GetMutableSuiteCase(
int i) {
607 const int index = GetElementOr(test_suite_indices_,
i, -1);
608 return index < 0 ? nullptr : test_suites_[static_cast<size_t>(index)];
609 }
610
611
612 TestEventListeners* listeners() { return &listeners_; }
613
614
615
616 TestResult* current_test_result();
617
618
619 const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; }
620
621
622
623
624
625
626 void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter);
627
628
629
630
631 OsStackTraceGetterInterface* os_stack_trace_getter();
632
633
634
635
636
637
638
639
640
641
642
644
645
646
647
648
649
650
651
652
653
654
655 TestSuite* GetTestSuite(const char* test_suite_name, const char* type_param,
658
659
660#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
661 TestCase* GetTestCase(
const char* test_case_name,
const char* type_param,
664 return GetTestSuite(test_case_name, type_param, set_up_tc, tear_down_tc);
665 }
666#endif
667
668
669
670
671
672
673
674
677 TestInfo* test_info) {
678#if GTEST_HAS_DEATH_TEST
679
680
681
682
683
684
685
689 << "Failed to get the current working directory.";
690 }
691#endif
692
693 GetTestSuite(test_info->test_suite_name(), test_info->type_param(),
694 set_up_tc, tear_down_tc)
695 ->AddTestInfo(test_info);
696 }
697
698
699
700 internal::ParameterizedTestSuiteRegistry& parameterized_test_registry() {
701 return parameterized_test_registry_;
702 }
703
704 std::set<std::string>* ignored_parameterized_test_suites() {
705 return &ignored_parameterized_test_suites_;
706 }
707
708
709
710 internal::TypeParameterizedTestSuiteRegistry&
711 type_parameterized_test_registry() {
712 return type_parameterized_test_registry_;
713 }
714
715
716 void set_current_test_suite(TestSuite* a_current_test_suite) {
717 current_test_suite_ = a_current_test_suite;
718 }
719
720
721
722
723 void set_current_test_info(TestInfo* a_current_test_info) {
724 current_test_info_ = a_current_test_info;
725 }
726
727
728
729
730
731
732
733 void RegisterParameterizedTests();
734
735
736
737
738
740
741
742 void ClearNonAdHocTestResult() {
743 ForEach(test_suites_, TestSuite::ClearTestSuiteResult);
744 }
745
746
747 void ClearAdHocTestResult() {
748 ad_hoc_test_result_.Clear();
749 }
750
751
752
753
754
755 void RecordProperty(const TestProperty& test_property);
756
757 enum ReactionToSharding {
758 HONOR_SHARDING_PROTOCOL,
759 IGNORE_SHARDING_PROTOCOL
760 };
761
762
763
764
765
766
767
768 int FilterTests(ReactionToSharding shard_tests);
769
770
771 void ListTestsMatchingFilter();
772
773 const TestSuite* current_test_suite() const { return current_test_suite_; }
774 TestInfo* current_test_info() { return current_test_info_; }
775 const TestInfo* current_test_info() const { return current_test_info_; }
776
777
778
779 std::vector<Environment*>& environments() { return environments_; }
780
781
782 std::vector<TraceInfo>& gtest_trace_stack() {
783 return *(gtest_trace_stack_.pointer());
784 }
785 const std::vector<TraceInfo>& gtest_trace_stack() const {
786 return gtest_trace_stack_.get();
787 }
788
789#if GTEST_HAS_DEATH_TEST
790 void InitDeathTestSubprocessControlInfo() {
791 internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
792 }
793
794
795
796
797 const InternalRunDeathTestFlag* internal_run_death_test_flag() const {
798 return internal_run_death_test_flag_.get();
799 }
800
801
802 internal::DeathTestFactory* death_test_factory() {
803 return death_test_factory_.get();
804 }
805
806 void SuppressTestEventsIfInSubprocess();
807
808 friend class ReplaceDeathTestFactory;
809#endif
810
811
812
813 void ConfigureXmlOutput();
814
815#if GTEST_CAN_STREAM_RESULTS_
816
817
818 void ConfigureStreamingOutput();
819#endif
820
821
822
823
824
825
826 void PostFlagParsingInit();
827
828
829 int random_seed() const { return random_seed_; }
830
831
832 internal::Random* random() {
return &
random_; }
833
834
835
836 void ShuffleTests();
837
838
839 void UnshuffleTests();
840
841
842
843 bool catch_exceptions() const { return catch_exceptions_; }
844
845 private:
846 friend class ::testing::UnitTest;
847
848
849
850 void set_catch_exceptions(
bool value) { catch_exceptions_ =
value; }
851
852
853 UnitTest* const parent_;
854
855
856
858
859
860 DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_;
861 DefaultPerThreadTestPartResultReporter
862 default_per_thread_test_part_result_reporter_;
863
864
865 TestPartResultReporterInterface* global_test_part_result_repoter_;
866
867
868 internal::Mutex global_test_part_result_reporter_mutex_;
869
870
871 internal::ThreadLocal<TestPartResultReporterInterface*>
872 per_thread_test_part_result_reporter_;
873
874
875
876 std::vector<Environment*> environments_;
877
878
879
880 std::vector<TestSuite*> test_suites_;
881
882
883
884
885
886 std::vector<int> test_suite_indices_;
887
888
889
890 internal::ParameterizedTestSuiteRegistry parameterized_test_registry_;
891 internal::TypeParameterizedTestSuiteRegistry
892 type_parameterized_test_registry_;
893
894
895
896 std::set<std::string> ignored_parameterized_test_suites_;
897
898
899 bool parameterized_tests_registered_;
900
901
902 int last_death_test_suite_;
903
904
905
906
907
908 TestSuite* current_test_suite_;
909
910
911
912
913
914 TestInfo* current_test_info_;
915
916
917
918
919
920
921
922
923
924 TestResult ad_hoc_test_result_;
925
926
927
928 TestEventListeners listeners_;
929
930
931
932
933
934 OsStackTraceGetterInterface* os_stack_trace_getter_;
935
936
937 bool post_flag_parse_init_performed_;
938
939
940 int random_seed_;
941
942
944
945
946
948
949
951
952#if GTEST_HAS_DEATH_TEST
953
954
955 std::unique_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_;
956 std::unique_ptr<internal::DeathTestFactory> death_test_factory_;
957#endif
958
959
960 internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_;
961
962
963
964 bool catch_exceptions_;
965
967};
968
969
970
971inline UnitTestImpl* GetUnitTestImpl() {
972 return UnitTest::GetInstance()->impl();
973}
974
975#if GTEST_USES_SIMPLE_RE
976
977
978
986GTEST_API_ bool AtomMatchesChar(
bool escaped,
char pattern,
char ch);
987GTEST_API_ bool ValidateRegex(
const char* regex);
988GTEST_API_ bool MatchRegexAtHead(
const char* regex,
const char* str);
990 bool escaped,
char ch,
char repeat,
const char* regex,
const char* str);
991GTEST_API_ bool MatchRegexAnywhere(
const char* regex,
const char* str);
992
993#endif
994
995
996
999
1000#if GTEST_HAS_DEATH_TEST
1001
1002
1003
1004GTEST_API_ std::string GetLastErrnoDescription();
1005
1006
1007
1008
1009
1010template <typename Integer>
1011bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
1012
1013
1014
1015 if (str.empty() || !
IsDigit(str[0])) {
1016 return false;
1017 }
1018 errno = 0;
1019
1020 char* end;
1021
1022
1023 using BiggestConvertible = unsigned long long;
1024
1025 const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10);
1026 const bool parse_success = *end == '\0' && errno == 0;
1027
1029
1030 const Integer result = static_cast<Integer>(parsed);
1031 if (parse_success && static_cast<BiggestConvertible>(result) == parsed) {
1032 *number = result;
1033 return true;
1034 }
1035 return false;
1036}
1037#endif
1038
1039
1040
1041
1042
1043
1044
1045class TestResultAccessor {
1046 public:
1047 static void RecordProperty(TestResult* test_result,
1048 const std::string& xml_element,
1049 const TestProperty& property) {
1050 test_result->RecordProperty(xml_element, property);
1051 }
1052
1053 static void ClearTestPartResults(TestResult* test_result) {
1054 test_result->ClearTestPartResults();
1055 }
1056
1057 static const std::vector<testing::TestPartResult>& test_part_results(
1058 const TestResult& test_result) {
1059 return test_result.test_part_results();
1060 }
1061};
1062
1063#if GTEST_CAN_STREAM_RESULTS_
1064
1065
1066class StreamingListener : public EmptyTestEventListener {
1067 public:
1068
1069 class AbstractSocketWriter {
1070 public:
1071 virtual ~AbstractSocketWriter() {}
1072
1073
1074 virtual void Send(
const std::string&
message) = 0;
1075
1076
1077 virtual void CloseConnection() {}
1078
1079
1080 void SendLn(
const std::string&
message) { Send(
message +
"\n"); }
1081 };
1082
1083
1084 class SocketWriter : public AbstractSocketWriter {
1085 public:
1086 SocketWriter(const std::string& host, const std::string& port)
1087 : sockfd_(-1), host_name_(host), port_num_(port) {
1088 MakeConnection();
1089 }
1090
1091 ~SocketWriter() override {
1092 if (sockfd_ != -1)
1093 CloseConnection();
1094 }
1095
1096
1097 void Send(
const std::string&
message)
override {
1099 << "Send() can be called only when there is a connection.";
1100
1101 const auto len =
static_cast<size_t>(
message.length());
1102 if (write(sockfd_,
message.c_str(), len) !=
static_cast<ssize_t
>(len)) {
1104 << "stream_result_to: failed to stream to "
1105 << host_name_ << ":" << port_num_;
1106 }
1107 }
1108
1109 private:
1110
1111 void MakeConnection();
1112
1113
1114 void CloseConnection() override {
1116 << "CloseConnection() can be called only when there is a connection.";
1117
1118 close(sockfd_);
1119 sockfd_ = -1;
1120 }
1121
1122 int sockfd_;
1123 const std::string host_name_;
1124 const std::string port_num_;
1125
1127 };
1128
1129
1130 static std::string UrlEncode(const char* str);
1131
1132 StreamingListener(const std::string& host, const std::string& port)
1133 : socket_writer_(new SocketWriter(host, port)) {
1134 Start();
1135 }
1136
1137 explicit StreamingListener(AbstractSocketWriter* socket_writer)
1138 : socket_writer_(socket_writer) { Start(); }
1139
1140 void OnTestProgramStart(const UnitTest& ) override {
1141 SendLn("event=TestProgramStart");
1142 }
1143
1144 void OnTestProgramEnd(const UnitTest& unit_test) override {
1145
1146
1147 SendLn("event=TestProgramEnd&passed=" + FormatBool(unit_test.Passed()));
1148
1149
1150 socket_writer_->CloseConnection();
1151 }
1152
1153 void OnTestIterationStart(const UnitTest& ,
1154 int iteration) override {
1155 SendLn("event=TestIterationStart&iteration=" +
1157 }
1158
1159 void OnTestIterationEnd(const UnitTest& unit_test,
1160 int ) override {
1161 SendLn("event=TestIterationEnd&passed=" +
1162 FormatBool(unit_test.Passed()) + "&elapsed_time=" +
1164 }
1165
1166
1167
1168 void OnTestCaseStart(
const TestCase& test_case)
override {
1169 SendLn(std::string("event=TestCaseStart&name=") + test_case.name());
1170 }
1171
1172
1173
1174 void OnTestCaseEnd(
const TestCase& test_case)
override {
1175 SendLn("event=TestCaseEnd&passed=" + FormatBool(test_case.Passed()) +
1177 "ms");
1178 }
1179
1180 void OnTestStart(const TestInfo& test_info) override {
1181 SendLn(std::string("event=TestStart&name=") + test_info.name());
1182 }
1183
1184 void OnTestEnd(const TestInfo& test_info) override {
1185 SendLn("event=TestEnd&passed=" +
1186 FormatBool((test_info.result())->Passed()) +
1187 "&elapsed_time=" +
1189 }
1190
1191 void OnTestPartResult(const TestPartResult& test_part_result) override {
1192 const char* file_name = test_part_result.file_name();
1193 if (file_name == nullptr) file_name = "";
1194 SendLn("event=TestPartResult&file=" + UrlEncode(file_name) +
1196 "&message=" + UrlEncode(test_part_result.message()));
1197 }
1198
1199 private:
1200
1201 void SendLn(
const std::string&
message) { socket_writer_->SendLn(
message); }
1202
1203
1204
1205 void Start() { SendLn("gtest_streaming_protocol_version=1.0"); }
1206
1207 std::string FormatBool(
bool value) {
return value ?
"1" :
"0"; }
1208
1209 const std::unique_ptr<AbstractSocketWriter> socket_writer_;
1210
1212};
1213
1214#endif
1215
1216}
1217}
#define GTEST_ATTRIBUTE_UNUSED_
#define GTEST_DECLARE_bool_(name)
#define GTEST_LOG_(severity)
#define GTEST_CHECK_(condition)
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
FilePath original_working_dir_
internal::TimeInMillis TimeInMillis
std::string WideStringToUtf8(const wchar_t *str, int num_chars)
void WriteToShardStatusFileIfNeeded()
bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id)
void ParseGoogleTestFlagsOnly(int *argc, char **argv)
std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms)
int32_t Int32FromEnvOrDie(const char *var, int32_t default_val)
bool ParseInt32Flag(const char *str, const char *flag, int32_t *value)
FilePath GetCurrentExecutableName()
void(*)() TearDownTestSuiteFunc
void(*)() SetUpTestSuiteFunc
bool ShouldShard(const char *total_shards_env, const char *shard_index_env, bool in_subprocess_for_death_test)
std::string FormatTimeInMillisAsSeconds(TimeInMillis ms)
std::string StreamableToString(const T &streamable)
bool ShouldUseColor(bool stdout_is_tty)
const TypeId kTestTypeIdInGoogleTest
std::string CodePointToUtf8(uint32_t code_point)
TimeInMillis GetTimeInMillis()