umd/external/protobuf-2.6/gtest/fused-src/gtest/gtest-all.cc
InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
  if (GTEST_FLAG(internal_run_death_test) == "") return NULL;

  // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we
  // can use it here.
  int line = -1;
  int index = -1;
  ::std::vector< ::std::string> fields;
  SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields);
  int write_fd = -1;

#if GTEST_OS_WINDOWS
  unsigned int parent_process_id = 0;
  size_t write_handle_as_size_t = 0;
  size_t event_handle_as_size_t = 0;

  if (fields.size() != 6
      || !ParseNaturalNumber(fields[1], &line)
      || !ParseNaturalNumber(fields[2], &index)
      || !ParseNaturalNumber(fields[3], &parent_process_id)
      || !ParseNaturalNumber(fields[4], &write_handle_as_size_t)
      || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {
    DeathTestAbort(String::Format(
        "Bad --gtest_internal_run_death_test flag: %s",
        GTEST_FLAG(internal_run_death_test).c_str()));
  }
  write_fd = GetStatusFileDescriptor(parent_process_id,
                                     write_handle_as_size_t,
                                     event_handle_as_size_t);
#else
  if (fields.size() != 4
      || !ParseNaturalNumber(fields[1], &line)
      || !ParseNaturalNumber(fields[2], &index)
      || !ParseNaturalNumber(fields[3], &write_fd)) {
    DeathTestAbort(String::Format(
        "Bad --gtest_internal_run_death_test flag: %s",
        GTEST_FLAG(internal_run_death_test).c_str()));
  }
#endif  // GTEST_OS_WINDOWS
  return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);
}
// Returns a newly created InternalRunDeathTestFlag object with fields
// initialized from the GTEST_FLAG(internal_run_death_test) flag if
// the flag is specified; otherwise returns NULL.
Returns a newly created InternalRunDeathTestFlag object with fields
initialized from the GTEST_FLAG(internal_run_death_test) flag if
the flag is specified; otherwise returns NULL.
Returns a newly created InternalRunDeathTestFlag object with fields initialized from the GTEST_FLAG ( internal_run_death_test ) flag if the flag is specified ; otherwise returns NULL .
InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
  if (GTEST_FLAG(internal_run_death_test) == "") return NULL;
  int line = -1;
  int index = -1;
  ::std::vector< ::std::string> fields;
  SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields);
  int write_fd = -1;
#if GTEST_OS_WINDOWS
  unsigned int parent_process_id = 0;
  size_t write_handle_as_size_t = 0;
  size_t event_handle_as_size_t = 0;
  if (fields.size() != 6
      || !ParseNaturalNumber(fields[1], &line)
      || !ParseNaturalNumber(fields[2], &index)
      || !ParseNaturalNumber(fields[3], &parent_process_id)
      || !ParseNaturalNumber(fields[4], &write_handle_as_size_t)
      || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {
    DeathTestAbort(String::Format(
        "Bad --gtest_internal_run_death_test flag: %s",
        GTEST_FLAG(internal_run_death_test).c_str()));
  }
  write_fd = GetStatusFileDescriptor(parent_process_id,
                                     write_handle_as_size_t,
                                     event_handle_as_size_t);
#else
  if (fields.size() != 4
      || !ParseNaturalNumber(fields[1], &line)
      || !ParseNaturalNumber(fields[2], &index)
      || !ParseNaturalNumber(fields[3], &write_fd)) {
    DeathTestAbort(String::Format(
        "Bad --gtest_internal_run_death_test flag: %s",
        GTEST_FLAG(internal_run_death_test).c_str()));
  }
#endif  
  return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);
}
InternalRunDeathTestFlag * ParseInternalRunDeathTestFlag ( ) { if ( GTEST_FLAG ( internal_run_death_test ) == " " ) return NULL ; int line = -1 ; int index = -1 ; :: std :: vector < :: std :: string > fields ; SplitString ( GTEST_FLAG ( internal_run_death_test ) . c_str ( ) , ' ' , & fields ) ; int write_fd = -1 ; #if GTEST_OS_WINDOWS unsigned int parent_process_id = 0 ; size_t write_handle_as_size_t = 0 ; size_t event_handle_as_size_t = 0 ; if ( fields . size ( ) != 6 || ! ParseNaturalNumber ( fields [ 1 ] , & line ) || ! ParseNaturalNumber ( fields [ 2 ] , & index ) || ! ParseNaturalNumber ( fields [ 3 ] , & parent_process_id ) || ! ParseNaturalNumber ( fields [ 4 ] , & write_handle_as_size_t ) || ! ParseNaturalNumber ( fields [ 5 ] , & event_handle_as_size_t ) ) { DeathTestAbort ( String :: Format ( " " , GTEST_FLAG ( internal_run_death_test ) . c_str ( ) ) ) ; } write_fd = GetStatusFileDescriptor ( parent_process_id , write_handle_as_size_t , event_handle_as_size_t ) ; #else if ( fields . size ( ) != 4 || ! ParseNaturalNumber ( fields [ 1 ] , & line ) || ! ParseNaturalNumber ( fields [ 2 ] , & index ) || ! ParseNaturalNumber ( fields [ 3 ] , & write_fd ) ) { DeathTestAbort ( String :: Format ( " " , GTEST_FLAG ( internal_run_death_test ) . c_str ( ) ) ) ; } #endif return new InternalRunDeathTestFlag ( fields [ 0 ] , line , index , write_fd ) ; }
Returns a newly created InternalRunDeathTestFlag object with fields
initialized from the GTEST_FLAG(internal_run_death_test) flag if
the flag is specified; otherwise returns NULL.
Returns a newly created InternalRunDeathTestFlag object with fields initialized from the GTEST_FLAG ( internal_run_death_test ) flag if the flag is specified ; otherwise returns NULL .
// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we // can use it here. // GTEST_OS_WINDOWS