proxygen
gtest_repeat_test.cc File Reference
#include <stdlib.h>
#include <iostream>
#include "gtest/gtest.h"
#include "src/gtest-internal-inl.h"

Go to the source code of this file.

Namespaces

 testing
 

Macros

#define GTEST_IMPLEMENTATION_   1
 
#define GTEST_CHECK_INT_EQ_(expected, actual)
 

Functions

 testing::GTEST_DECLARE_string_ (death_test_style)
 
 testing::GTEST_DECLARE_string_ (filter)
 
 testing::GTEST_DECLARE_int32_ (repeat)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define GTEST_CHECK_INT_EQ_ (   expected,
  actual 
)
Value:
do {\
const int expected_val = (expected);\
const int actual_val = (actual);\
if (::testing::internal::IsTrue(expected_val != actual_val)) {\
::std::cout << "Value of: " #actual "\n"\
<< " Actual: " << actual_val << "\n"\
<< "Expected: " #expected "\n"\
<< "Which is: " << expected_val << "\n";\
}\
bool IsTrue(bool condition)
Definition: gtest.cc:4986
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1
const
Definition: upload.py:398

Definition at line 63 of file gtest_repeat_test.cc.

#define GTEST_IMPLEMENTATION_   1

Definition at line 43 of file gtest_repeat_test.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 229 of file gtest_repeat_test.cc.

References testing::AddGlobalTestEnvironment(), and testing::InitGoogleTest().

229  {
231  testing::AddGlobalTestEnvironment(new MyEnvironment);
232 
233  TestRepeatUnspecified();
234  TestRepeat(0);
235  TestRepeat(1);
236  TestRepeat(5);
237 
238  TestRepeatWithEmptyFilter(2);
239  TestRepeatWithEmptyFilter(3);
240 
241  TestRepeatWithFilterForSuccessfulTests(3);
242 
243  TestRepeatWithFilterForFailedTests(4);
244 
245  // It would be nice to verify that the tests indeed loop forever
246  // when GTEST_FLAG(repeat) is negative, but this test will be quite
247  // complicated to write. Since this flag is for interactive
248  // debugging only and doesn't affect the normal test result, such a
249  // test would be an overkill.
250 
251  printf("PASS\n");
252  return 0;
253 }
Environment * AddGlobalTestEnvironment(Environment *env)
Definition: gtest.h:1350
char ** argv
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: gtest.cc:5370