umd/external/protobuf-2.6/gtest/fused-src/gtest/gtest-all.cc
void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc,
                   Test::TearDownTestCaseFunc tear_down_tc,
                   TestInfo * test_info) {
    // In order to support thread-safe death tests, we need to
    // remember the original working directory when the test program
    // was first invoked.  We cannot do this in RUN_ALL_TESTS(), as
    // the user may have changed the current directory before calling
    // RUN_ALL_TESTS().  Therefore we capture the current directory in
    // AddTestInfo(), which is called to register a TEST or TEST_F
    // before main() is reached.
    if (original_working_dir_.IsEmpty()) {
      original_working_dir_.Set(FilePath::GetCurrentDir());
      GTEST_CHECK_(!original_working_dir_.IsEmpty())
          << "Failed to get the current working directory.";
    }

    GetTestCase(test_info->test_case_name(),
                test_info->test_case_comment(),
                set_up_tc,
                tear_down_tc)->AddTestInfo(test_info);
  }
// Adds a TestInfo to the unit test.
//
// Arguments:
//
//   set_up_tc:    pointer to the function that sets up the test case
//   tear_down_tc: pointer to the function that tears down the test case
//   test_info:    the TestInfo object
Adds a TestInfo to the unit test.
Arguments.

pointer to the function that sets up the test case
tear_down_tc: pointer to the function that tears down the test case
test_info:    the TestInfo object
Adds a TestInfo to the unit test . Arguments . pointer to the function that sets up the test case tear_down_tc : pointer to the function that tears down the test case test_info : the TestInfo object
void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc,
                   Test::TearDownTestCaseFunc tear_down_tc,
                   TestInfo * test_info) {
    if (original_working_dir_.IsEmpty()) {
      original_working_dir_.Set(FilePath::GetCurrentDir());
      GTEST_CHECK_(!original_working_dir_.IsEmpty())
          << "Failed to get the current working directory.";
    }
    GetTestCase(test_info->test_case_name(),
                test_info->test_case_comment(),
                set_up_tc,
                tear_down_tc)->AddTestInfo(test_info);
  }
void AddTestInfo ( Test :: SetUpTestCaseFunc set_up_tc , Test :: TearDownTestCaseFunc tear_down_tc , TestInfo * test_info ) { if ( original_working_dir_ . IsEmpty ( ) ) { original_working_dir_ . Set ( FilePath :: GetCurrentDir ( ) ) ; GTEST_CHECK_ ( ! original_working_dir_ . IsEmpty ( ) ) << " " ; } GetTestCase ( test_info -> test_case_name ( ) , test_info -> test_case_comment ( ) , set_up_tc , tear_down_tc ) -> AddTestInfo ( test_info ) ; }
Adds a TestInfo to the unit test.
Adds a TestInfo to the unit test .
// In order to support thread-safe death tests, we need to // remember the original working directory when the test program // was first invoked.  We cannot do this in RUN_ALL_TESTS(), as // the user may have changed the current directory before calling // RUN_ALL_TESTS().  Therefore we capture the current directory in // AddTestInfo(), which is called to register a TEST or TEST_F // before main() is reached.