Merge branch 'master' into cmake-binary-dir-fix

This commit is contained in:
Gennadiy Civil 2018-08-14 14:25:05 -07:00 committed by GitHub
commit 02671abb44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 64 additions and 103 deletions

View File

@ -73,7 +73,7 @@ namespace testing {
// MatchResultListener is an abstract class. Its << operator can be // MatchResultListener is an abstract class. Its << operator can be
// used by a matcher to explain why a value matches or doesn't match. // used by a matcher to explain why a value matches or doesn't match.
// //
// TODO(wan@google.com): add method // FIXME: add method
// bool InterestedInWhy(bool result) const; // bool InterestedInWhy(bool result) const;
// to indicate whether the listener is interested in why the match // to indicate whether the listener is interested in why the match
// result is 'result'. // result is 'result'.
@ -922,7 +922,7 @@ class TuplePrefix {
GTEST_REFERENCE_TO_CONST_(Value) value = get<N - 1>(values); GTEST_REFERENCE_TO_CONST_(Value) value = get<N - 1>(values);
StringMatchResultListener listener; StringMatchResultListener listener;
if (!matcher.MatchAndExplain(value, &listener)) { if (!matcher.MatchAndExplain(value, &listener)) {
// TODO(wan): include in the message the name of the parameter // FIXME: include in the message the name of the parameter
// as used in MOCK_METHOD*() when possible. // as used in MOCK_METHOD*() when possible.
*os << " Expected arg #" << N - 1 << ": "; *os << " Expected arg #" << N - 1 << ": ";
get<N - 1>(matchers).DescribeTo(os); get<N - 1>(matchers).DescribeTo(os);
@ -2420,7 +2420,7 @@ class WhenDynamicCastToMatcher : public WhenDynamicCastToMatcherBase<To> {
template <typename From> template <typename From>
bool MatchAndExplain(From from, MatchResultListener* listener) const { bool MatchAndExplain(From from, MatchResultListener* listener) const {
// TODO(sbenza): Add more detail on failures. ie did the dyn_cast fail? // FIXME: Add more detail on failures. ie did the dyn_cast fail?
To to = dynamic_cast<To>(from); To to = dynamic_cast<To>(from);
return MatchPrintAndExplain(to, this->matcher_, listener); return MatchPrintAndExplain(to, this->matcher_, listener);
} }

View File

@ -184,7 +184,7 @@ class GTEST_API_ UntypedFunctionMockerBase {
// this information in the global mock registry. Will be called // this information in the global mock registry. Will be called
// whenever an EXPECT_CALL() or ON_CALL() is executed on this mock // whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
// method. // method.
// TODO(wan@google.com): rename to SetAndRegisterOwner(). // FIXME: rename to SetAndRegisterOwner().
void RegisterOwner(const void* mock_obj) void RegisterOwner(const void* mock_obj)
GTEST_LOCK_EXCLUDED_(g_gmock_mutex); GTEST_LOCK_EXCLUDED_(g_gmock_mutex);
@ -1207,7 +1207,7 @@ class TypedExpectation : public ExpectationBase {
mocker->DescribeDefaultActionTo(args, what); mocker->DescribeDefaultActionTo(args, what);
DescribeCallCountTo(why); DescribeCallCountTo(why);
// TODO(wan@google.com): allow the user to control whether // FIXME: allow the user to control whether
// unexpected calls should fail immediately or continue using a // unexpected calls should fail immediately or continue using a
// flag --gmock_unexpected_calls_are_fatal. // flag --gmock_unexpected_calls_are_fatal.
return NULL; return NULL;

View File

@ -360,7 +360,7 @@ class WithoutMatchers {
// Internal use only: access the singleton instance of WithoutMatchers. // Internal use only: access the singleton instance of WithoutMatchers.
GTEST_API_ WithoutMatchers GetWithoutMatchers(); GTEST_API_ WithoutMatchers GetWithoutMatchers();
// TODO(wan@google.com): group all type utilities together. // FIXME: group all type utilities together.
// Type traits. // Type traits.

View File

@ -606,7 +606,7 @@ class MockObjectRegistry {
if (it->second.leakable) // The user said it's fine to leak this object. if (it->second.leakable) // The user said it's fine to leak this object.
continue; continue;
// TODO(wan@google.com): Print the type of the leaked object. // FIXME: Print the type of the leaked object.
// This can help the user identify the leaked object. // This can help the user identify the leaked object.
std::cout << "\n"; std::cout << "\n";
const MockObjectState& state = it->second; const MockObjectState& state = it->second;
@ -782,7 +782,7 @@ void Mock::RegisterUseByOnCallOrExpectCall(const void* mock_obj,
const TestInfo* const test_info = const TestInfo* const test_info =
UnitTest::GetInstance()->current_test_info(); UnitTest::GetInstance()->current_test_info();
if (test_info != NULL) { if (test_info != NULL) {
// TODO(wan@google.com): record the test case name when the // FIXME: record the test case name when the
// ON_CALL or EXPECT_CALL is invoked from SetUpTestCase() or // ON_CALL or EXPECT_CALL is invoked from SetUpTestCase() or
// TearDownTestCase(). // TearDownTestCase().
state.first_used_test_case = test_info->test_case_name(); state.first_used_test_case = test_info->test_case_name();

View File

@ -33,7 +33,7 @@
namespace testing { namespace testing {
// TODO(wan@google.com): support using environment variables to // FIXME: support using environment variables to
// control the flag values, like what Google Test does. // control the flag values, like what Google Test does.
GMOCK_DEFINE_bool_(catch_leaked_mocks, true, GMOCK_DEFINE_bool_(catch_leaked_mocks, true,

View File

@ -1343,7 +1343,7 @@ TEST(FunctorActionTest, UnusedArguments) {
} }
// Test that basic built-in actions work with move-only arguments. // Test that basic built-in actions work with move-only arguments.
// TODO(rburny): Currently, almost all ActionInterface-based actions will not // FIXME: Currently, almost all ActionInterface-based actions will not
// work, even if they only try to use other, copyable arguments. Implement them // work, even if they only try to use other, copyable arguments. Implement them
// if necessary (but note that DoAll cannot work on non-copyable types anyway - // if necessary (but note that DoAll cannot work on non-copyable types anyway -
// so maybe it's better to make users use lambdas instead. // so maybe it's better to make users use lambdas instead.

View File

@ -1175,7 +1175,7 @@ TEST(UnexpectedCallTest, UnsatisifiedPrerequisites) {
TEST(UndefinedReturnValueTest, TEST(UndefinedReturnValueTest,
ReturnValueIsMandatoryWhenNotDefaultConstructible) { ReturnValueIsMandatoryWhenNotDefaultConstructible) {
MockA a; MockA a;
// TODO(wan@google.com): We should really verify the output message, // FIXME: We should really verify the output message,
// but we cannot yet due to that EXPECT_DEATH only captures stderr // but we cannot yet due to that EXPECT_DEATH only captures stderr
// while Google Mock logs to stdout. // while Google Mock logs to stdout.
#if GTEST_HAS_EXCEPTIONS #if GTEST_HAS_EXCEPTIONS

View File

@ -31,8 +31,6 @@
"""Tests that leaked mock objects can be caught be Google Mock.""" """Tests that leaked mock objects can be caught be Google Mock."""
__author__ = 'wan@google.com (Zhanyong Wan)'
import gmock_test_utils import gmock_test_utils
PROGRAM_PATH = gmock_test_utils.GetTestExecutablePath('gmock_leak_test_') PROGRAM_PATH = gmock_test_utils.GetTestExecutablePath('gmock_leak_test_')

View File

@ -39,8 +39,6 @@ gmock_output_test.py
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import re import re
import sys import sys

View File

@ -29,8 +29,6 @@
"""Unit test utilities for Google C++ Mocking Framework.""" """Unit test utilities for Google C++ Mocking Framework."""
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import sys import sys

View File

@ -161,7 +161,7 @@ GTEST_API_ bool InDeathTestChild();
// is rarely a problem as people usually don't put the test binary // is rarely a problem as people usually don't put the test binary
// directory in PATH. // directory in PATH.
// //
// TODO(wan@google.com): make thread-safe death tests search the PATH. // FIXME: make thread-safe death tests search the PATH.
// Asserts that a given statement causes the program to exit, with an // Asserts that a given statement causes the program to exit, with an
// integer exit status that satisfies predicate, and emitting error output // integer exit status that satisfies predicate, and emitting error output

View File

@ -826,7 +826,7 @@ void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
// If the array has more than kThreshold elements, we'll have to // If the array has more than kThreshold elements, we'll have to
// omit some details by printing only the first and the last // omit some details by printing only the first and the last
// kChunkSize elements. // kChunkSize elements.
// TODO(wan@google.com): let the user control the threshold using a flag. // FIXME: let the user control the threshold using a flag.
if (len <= kThreshold) { if (len <= kThreshold) {
PrintRawArrayTo(begin, len, os); PrintRawArrayTo(begin, len, os);
} else { } else {

View File

@ -315,7 +315,7 @@ class GTEST_API_ AssertionResult {
const char* message() const { const char* message() const {
return message_.get() != NULL ? message_->c_str() : ""; return message_.get() != NULL ? message_->c_str() : "";
} }
// TODO(vladl@google.com): Remove this after making sure no clients use it. // FIXME: Remove this after making sure no clients use it.
// Deprecated; please use message() instead. // Deprecated; please use message() instead.
const char* failure_message() const { return message(); } const char* failure_message() const { return message(); }
@ -621,7 +621,7 @@ class GTEST_API_ TestResult {
// Adds a failure if the key is a reserved attribute of Google Test // Adds a failure if the key is a reserved attribute of Google Test
// testcase tags. Returns true if the property is valid. // testcase tags. Returns true if the property is valid.
// TODO(russr): Validate attribute names are legal and human readable. // FIXME: Validate attribute names are legal and human readable.
static bool ValidateTestProperty(const std::string& xml_element, static bool ValidateTestProperty(const std::string& xml_element,
const TestProperty& test_property); const TestProperty& test_property);

View File

@ -60,7 +60,7 @@
// raw pointer (e.g. via get()) concurrently, and // raw pointer (e.g. via get()) concurrently, and
// - it's safe to write to two linked_ptrs that point to the same // - it's safe to write to two linked_ptrs that point to the same
// shared object concurrently. // shared object concurrently.
// TODO(wan@google.com): rename this to safe_linked_ptr to avoid // FIXME: rename this to safe_linked_ptr to avoid
// confusion with normal linked_ptr. // confusion with normal linked_ptr.
// GOOGLETEST_CM0001 DO NOT DELETE // GOOGLETEST_CM0001 DO NOT DELETE

View File

@ -547,7 +547,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#ifndef GTEST_HAS_STD_WSTRING #ifndef GTEST_HAS_STD_WSTRING
// The user didn't tell us whether ::std::wstring is available, so we need // The user didn't tell us whether ::std::wstring is available, so we need
// to figure it out. // to figure it out.
// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring // FIXME: uses autoconf to detect whether ::std::wstring
// is available. // is available.
// Cygwin 1.7 and below doesn't support ::std::wstring. // Cygwin 1.7 and below doesn't support ::std::wstring.
@ -759,7 +759,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
// Until version 4.3.2, gcc has a bug that causes <tr1/functional>, // Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
// which is #included by <tr1/tuple>, to not compile when RTTI is // which is #included by <tr1/tuple>, to not compile when RTTI is
// disabled. _TR1_FUNCTIONAL is the header guard for // disabled. _TR1_FUNCTIONAL is the header guard for
// <tr1/functional>. Hence the following #define is a hack to prevent // <tr1/functional>. Hence the following #define is used to prevent
// <tr1/functional> from being included. // <tr1/functional> from being included.
# define _TR1_FUNCTIONAL 1 # define _TR1_FUNCTIONAL 1
# include <tr1/tuple> # include <tr1/tuple>
@ -1264,7 +1264,7 @@ class GTEST_API_ RE {
// PartialMatch(str, re) returns true iff regular expression re // PartialMatch(str, re) returns true iff regular expression re
// matches a substring of str (including str itself). // matches a substring of str (including str itself).
// //
// TODO(wan@google.com): make FullMatch() and PartialMatch() work // FIXME: make FullMatch() and PartialMatch() work
// when str contains NUL characters. // when str contains NUL characters.
static bool FullMatch(const ::std::string& str, const RE& re) { static bool FullMatch(const ::std::string& str, const RE& re) {
return FullMatch(str.c_str(), re); return FullMatch(str.c_str(), re);
@ -1291,7 +1291,7 @@ class GTEST_API_ RE {
void Init(const char* regex); void Init(const char* regex);
// We use a const char* instead of an std::string, as Google Test used to be // We use a const char* instead of an std::string, as Google Test used to be
// used where std::string is not available. TODO(wan@google.com): change to // used where std::string is not available. FIXME: change to
// std::string. // std::string.
const char* pattern_; const char* pattern_;
bool is_valid_; bool is_valid_;
@ -2684,7 +2684,7 @@ typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
// Parses 'str' for a 32-bit signed integer. If successful, writes the result // Parses 'str' for a 32-bit signed integer. If successful, writes the result
// to *value and returns true; otherwise leaves *value unchanged and returns // to *value and returns true; otherwise leaves *value unchanged and returns
// false. // false.
// TODO(chandlerc): Find a better way to refactor flag and environment parsing // FIXME: Find a better way to refactor flag and environment parsing
// out of both gtest-port.cc and gtest.cc to avoid exporting this utility // out of both gtest-port.cc and gtest.cc to avoid exporting this utility
// function. // function.
bool ParseInt32(const Message& src_text, const char* str, Int32* value); bool ParseInt32(const Message& src_text, const char* str, Int32* value);

View File

@ -43,7 +43,7 @@
// The compiler used in Symbian has a bug that prevents us from declaring the // The compiler used in Symbian has a bug that prevents us from declaring the
// tuple template as a friend (it complains that tuple is redefined). This // tuple template as a friend (it complains that tuple is redefined). This
// hack bypasses the bug by declaring the members that should otherwise be // bypasses the bug by declaring the members that should otherwise be
// private as public. // private as public.
// Sun Studio versions < 12 also have the above bug. // Sun Studio versions < 12 also have the above bug.
#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590) #if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)

View File

@ -42,7 +42,7 @@ $$ This meta comment fixes auto-indentation in Emacs. }}
// The compiler used in Symbian has a bug that prevents us from declaring the // The compiler used in Symbian has a bug that prevents us from declaring the
// tuple template as a friend (it complains that tuple is redefined). This // tuple template as a friend (it complains that tuple is redefined). This
// hack bypasses the bug by declaring the members that should otherwise be // bypasses the bug by declaring the members that should otherwise be
// private as public. // private as public.
// Sun Studio versions < 12 also have the above bug. // Sun Studio versions < 12 also have the above bug.
#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590) #if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)

View File

@ -266,7 +266,7 @@ static const int kFuchsiaReadPipeFd = 3;
// statement, which is not allowed; THREW means that the test statement // statement, which is not allowed; THREW means that the test statement
// returned control by throwing an exception. IN_PROGRESS means the test // returned control by throwing an exception. IN_PROGRESS means the test
// has not yet concluded. // has not yet concluded.
// TODO(vladl@google.com): Unify names and possibly values for // FIXME: Unify names and possibly values for
// AbortReason, DeathTestOutcome, and flag characters above. // AbortReason, DeathTestOutcome, and flag characters above.
enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }; enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW };
@ -1458,7 +1458,7 @@ static int GetStatusFileDescriptor(unsigned int parent_process_id,
StreamableToString(parent_process_id)); StreamableToString(parent_process_id));
} }
// TODO(vladl@google.com): Replace the following check with a // FIXME: Replace the following check with a
// compile-time assertion when available. // compile-time assertion when available.
GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t)); GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t));

View File

@ -250,7 +250,7 @@ bool FilePath::DirectoryExists() const {
// root directory per disk drive.) // root directory per disk drive.)
bool FilePath::IsRootDirectory() const { bool FilePath::IsRootDirectory() const {
#if GTEST_OS_WINDOWS #if GTEST_OS_WINDOWS
// TODO(wan@google.com): on Windows a network share like // FIXME: on Windows a network share like
// \\server\share can be a root directory, although it cannot be the // \\server\share can be a root directory, although it cannot be the
// current directory. Handle this properly. // current directory. Handle this properly.
return pathname_.length() == 3 && IsAbsolutePath(); return pathname_.length() == 3 && IsAbsolutePath();
@ -350,7 +350,7 @@ FilePath FilePath::RemoveTrailingPathSeparator() const {
// Removes any redundant separators that might be in the pathname. // Removes any redundant separators that might be in the pathname.
// For example, "bar///foo" becomes "bar/foo". Does not eliminate other // For example, "bar///foo" becomes "bar/foo". Does not eliminate other
// redundancies that might be in a pathname involving "." or "..". // redundancies that might be in a pathname involving "." or "..".
// TODO(wan@google.com): handle Windows network shares (e.g. \\server\share). // FIXME: handle Windows network shares (e.g. \\server\share).
void FilePath::Normalize() { void FilePath::Normalize() {
if (pathname_.c_str() == NULL) { if (pathname_.c_str() == NULL) {
pathname_ = ""; pathname_ = "";

View File

@ -991,7 +991,7 @@ bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
const bool parse_success = *end == '\0' && errno == 0; const bool parse_success = *end == '\0' && errno == 0;
// TODO(vladl@google.com): Convert this to compile time assertion when it is // FIXME: Convert this to compile time assertion when it is
// available. // available.
GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed)); GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed));

View File

@ -261,7 +261,7 @@ Mutex::Mutex()
Mutex::~Mutex() { Mutex::~Mutex() {
// Static mutexes are leaked intentionally. It is not thread-safe to try // Static mutexes are leaked intentionally. It is not thread-safe to try
// to clean them up. // to clean them up.
// TODO(yukawa): Switch to Slim Reader/Writer (SRW) Locks, which requires // FIXME: Switch to Slim Reader/Writer (SRW) Locks, which requires
// nothing to clean it up but is available only on Vista and later. // nothing to clean it up but is available only on Vista and later.
// https://docs.microsoft.com/en-us/windows/desktop/Sync/slim-reader-writer--srw--locks // https://docs.microsoft.com/en-us/windows/desktop/Sync/slim-reader-writer--srw--locks
if (type_ == kDynamic) { if (type_ == kDynamic) {
@ -343,7 +343,7 @@ class ThreadWithParamSupport : public ThreadWithParamBase {
Notification* thread_can_start) { Notification* thread_can_start) {
ThreadMainParam* param = new ThreadMainParam(runnable, thread_can_start); ThreadMainParam* param = new ThreadMainParam(runnable, thread_can_start);
DWORD thread_id; DWORD thread_id;
// TODO(yukawa): Consider to use _beginthreadex instead. // FIXME: Consider to use _beginthreadex instead.
HANDLE thread_handle = ::CreateThread( HANDLE thread_handle = ::CreateThread(
NULL, // Default security. NULL, // Default security.
0, // Default stack size. 0, // Default stack size.
@ -695,7 +695,7 @@ static std::string FormatRegexSyntaxError(const char* regex, int index) {
// otherwise returns true. // otherwise returns true.
bool ValidateRegex(const char* regex) { bool ValidateRegex(const char* regex) {
if (regex == NULL) { if (regex == NULL) {
// TODO(wan@google.com): fix the source file location in the // FIXME: fix the source file location in the
// assertion failures to match where the regex is used in user // assertion failures to match where the regex is used in user
// code. // code.
ADD_FAILURE() << "NULL is not a valid simple regular expression."; ADD_FAILURE() << "NULL is not a valid simple regular expression.";

View File

@ -89,7 +89,7 @@ void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
// If the object size is bigger than kThreshold, we'll have to omit // If the object size is bigger than kThreshold, we'll have to omit
// some details by printing only the first and the last kChunkSize // some details by printing only the first and the last kChunkSize
// bytes. // bytes.
// TODO(wan): let the user control the threshold using a flag. // FIXME: let the user control the threshold using a flag.
if (count < kThreshold) { if (count < kThreshold) {
PrintByteSegmentInObjectTo(obj_bytes, 0, count, os); PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
} else { } else {

View File

@ -54,7 +54,7 @@
#if GTEST_OS_LINUX #if GTEST_OS_LINUX
// TODO(kenton@google.com): Use autoconf to detect availability of // FIXME: Use autoconf to detect availability of
// gettimeofday(). // gettimeofday().
# define GTEST_HAS_GETTIMEOFDAY_ 1 # define GTEST_HAS_GETTIMEOFDAY_ 1
@ -93,9 +93,9 @@
# if GTEST_OS_WINDOWS_MINGW # if GTEST_OS_WINDOWS_MINGW
// MinGW has gettimeofday() but not _ftime64(). // MinGW has gettimeofday() but not _ftime64().
// TODO(kenton@google.com): Use autoconf to detect availability of // FIXME: Use autoconf to detect availability of
// gettimeofday(). // gettimeofday().
// TODO(kenton@google.com): There are other ways to get the time on // FIXME: There are other ways to get the time on
// Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW // Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW
// supports these. consider using them instead. // supports these. consider using them instead.
# define GTEST_HAS_GETTIMEOFDAY_ 1 # define GTEST_HAS_GETTIMEOFDAY_ 1
@ -110,7 +110,7 @@
#else #else
// Assume other platforms have gettimeofday(). // Assume other platforms have gettimeofday().
// TODO(kenton@google.com): Use autoconf to detect availability of // FIXME: Use autoconf to detect availability of
// gettimeofday(). // gettimeofday().
# define GTEST_HAS_GETTIMEOFDAY_ 1 # define GTEST_HAS_GETTIMEOFDAY_ 1
@ -467,7 +467,7 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() {
internal::FilePath output_name(colon + 1); internal::FilePath output_name(colon + 1);
if (!output_name.IsAbsolutePath()) if (!output_name.IsAbsolutePath())
// TODO(wan@google.com): on Windows \some\path is not an absolute // FIXME: on Windows \some\path is not an absolute
// path (as its meaning depends on the current drive), yet the // path (as its meaning depends on the current drive), yet the
// following logic for turning it into an absolute path is wrong. // following logic for turning it into an absolute path is wrong.
// Fix it. // Fix it.
@ -841,7 +841,7 @@ TimeInMillis GetTimeInMillis() {
SYSTEMTIME now_systime; SYSTEMTIME now_systime;
FILETIME now_filetime; FILETIME now_filetime;
ULARGE_INTEGER now_int64; ULARGE_INTEGER now_int64;
// TODO(kenton@google.com): Shouldn't this just use // FIXME: Shouldn't this just use
// GetSystemTimeAsFileTime()? // GetSystemTimeAsFileTime()?
GetSystemTime(&now_systime); GetSystemTime(&now_systime);
if (SystemTimeToFileTime(&now_systime, &now_filetime)) { if (SystemTimeToFileTime(&now_systime, &now_filetime)) {
@ -857,7 +857,7 @@ TimeInMillis GetTimeInMillis() {
// MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996 // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996
// (deprecated function) there. // (deprecated function) there.
// TODO(kenton@google.com): Use GetTickCount()? Or use // FIXME: Use GetTickCount()? Or use
// SystemTimeToFileTime() // SystemTimeToFileTime()
GTEST_DISABLE_MSC_DEPRECATED_PUSH_() GTEST_DISABLE_MSC_DEPRECATED_PUSH_()
_ftime64(&now); _ftime64(&now);
@ -1396,7 +1396,7 @@ AssertionResult DoubleNearPredFormat(const char* expr1,
const double diff = fabs(val1 - val2); const double diff = fabs(val1 - val2);
if (diff <= abs_error) return AssertionSuccess(); if (diff <= abs_error) return AssertionSuccess();
// TODO(wan): do not print the value of an expression if it's // FIXME: do not print the value of an expression if it's
// already a literal. // already a literal.
return AssertionFailure() return AssertionFailure()
<< "The difference between " << expr1 << " and " << expr2 << "The difference between " << expr1 << " and " << expr2
@ -3334,7 +3334,7 @@ void TestEventRepeater::Append(TestEventListener *listener) {
listeners_.push_back(listener); listeners_.push_back(listener);
} }
// TODO(vladl@google.com): Factor the search functionality into Vector::Find. // FIXME: Factor the search functionality into Vector::Find.
TestEventListener* TestEventRepeater::Release(TestEventListener *listener) { TestEventListener* TestEventRepeater::Release(TestEventListener *listener) {
for (size_t i = 0; i < listeners_.size(); ++i) { for (size_t i = 0; i < listeners_.size(); ++i) {
if (listeners_[i] == listener) { if (listeners_[i] == listener) {
@ -3499,7 +3499,7 @@ void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
xmlout = posix::FOpen(output_file_.c_str(), "w"); xmlout = posix::FOpen(output_file_.c_str(), "w");
} }
if (xmlout == NULL) { if (xmlout == NULL) {
// TODO(wan): report the reason of the failure. // FIXME: report the reason of the failure.
// //
// We don't do it for now as: // We don't do it for now as:
// //
@ -3528,7 +3528,7 @@ void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
// module will consist of ordinary English text. // module will consist of ordinary English text.
// If this module is ever modified to produce version 1.1 XML output, // If this module is ever modified to produce version 1.1 XML output,
// most invalid characters can be retained using character references. // most invalid characters can be retained using character references.
// TODO(wan): It might be nice to have a minimally invasive, human-readable // FIXME: It might be nice to have a minimally invasive, human-readable
// escaping scheme for invalid characters, rather than dropping them. // escaping scheme for invalid characters, rather than dropping them.
std::string XmlUnitTestResultPrinter::EscapeXml( std::string XmlUnitTestResultPrinter::EscapeXml(
const std::string& str, bool is_attribute) { const std::string& str, bool is_attribute) {
@ -3679,7 +3679,7 @@ void XmlUnitTestResultPrinter::OutputXmlAttribute(
} }
// Prints an XML representation of a TestInfo object. // Prints an XML representation of a TestInfo object.
// TODO(wan): There is also value in printing properties with the plain printer. // FIXME: There is also value in printing properties with the plain printer.
void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream, void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
const char* test_case_name, const char* test_case_name,
const TestInfo& test_info) { const TestInfo& test_info) {
@ -3906,7 +3906,7 @@ void JsonUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
jsonout = posix::FOpen(output_file_.c_str(), "w"); jsonout = posix::FOpen(output_file_.c_str(), "w");
} }
if (jsonout == NULL) { if (jsonout == NULL) {
// TODO(phosek): report the reason of the failure. // FIXME: report the reason of the failure.
// //
// We don't do it for now as: // We don't do it for now as:
// //
@ -4721,7 +4721,7 @@ int UnitTest::Run() {
// VC++ doesn't define _set_abort_behavior() prior to the version 8.0. // VC++ doesn't define _set_abort_behavior() prior to the version 8.0.
// Users of prior VC versions shall suffer the agony and pain of // Users of prior VC versions shall suffer the agony and pain of
// clicking through the countless debug dialogs. // clicking through the countless debug dialogs.
// TODO(vladl@google.com): find a way to suppress the abort dialog() in the // FIXME: find a way to suppress the abort dialog() in the
// debug mode when compiled with VC 7.1 or lower. // debug mode when compiled with VC 7.1 or lower.
if (!GTEST_FLAG(break_on_failure)) if (!GTEST_FLAG(break_on_failure))
_set_abort_behavior( _set_abort_behavior(
@ -5615,7 +5615,7 @@ static bool HasGoogleTestFlagPrefix(const char* str) {
// @Y changes the color to yellow. // @Y changes the color to yellow.
// @D changes to the default terminal text color. // @D changes to the default terminal text color.
// //
// TODO(wan@google.com): Write tests for this once we add stdout // FIXME: Write tests for this once we add stdout
// capturing to Google Test. // capturing to Google Test.
static void PrintColorEncoded(const char* str) { static void PrintColorEncoded(const char* str) {
GTestColor color = COLOR_DEFAULT; // The current color. GTestColor color = COLOR_DEFAULT; // The current color.

View File

@ -38,8 +38,6 @@ by invoking googletest-break-on-failure-unittest_ (a program written with
Google Test) with different environments and command line flags. Google Test) with different environments and command line flags.
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import gtest_test_utils import gtest_test_utils

View File

@ -35,8 +35,6 @@ googletest-catch-exceptions-ex-test_ (programs written with
Google Test) and verifies their output. Google Test) and verifies their output.
""" """
__author__ = 'vladl@google.com (Vlad Losev)'
import gtest_test_utils import gtest_test_utils
# Constants. # Constants.

View File

@ -31,8 +31,6 @@
"""Verifies that Google Test correctly determines whether to use colors.""" """Verifies that Google Test correctly determines whether to use colors."""
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import gtest_test_utils import gtest_test_utils

View File

@ -1279,7 +1279,7 @@ TEST(ParseNaturalNumberTest, WorksForShorterIntegers) {
# if GTEST_OS_WINDOWS # if GTEST_OS_WINDOWS
TEST(EnvironmentTest, HandleFitsIntoSizeT) { TEST(EnvironmentTest, HandleFitsIntoSizeT) {
// TODO(vladl@google.com): Remove this test after this condition is verified // FIXME: Remove this test after this condition is verified
// in a static assertion in gtest-death-test.cc in the function // in a static assertion in gtest-death-test.cc in the function
// GetStatusFileDescriptor. // GetStatusFileDescriptor.
ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t)); ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t));

View File

@ -31,8 +31,6 @@
"""Verifies that Google Test correctly parses environment variables.""" """Verifies that Google Test correctly parses environment variables."""
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import gtest_test_utils import gtest_test_utils

View File

@ -50,7 +50,7 @@ namespace internal {
namespace { namespace {
#if GTEST_OS_WINDOWS_MOBILE #if GTEST_OS_WINDOWS_MOBILE
// TODO(wan@google.com): Move these to the POSIX adapter section in // FIXME: Move these to the POSIX adapter section in
// gtest-port.h. // gtest-port.h.
// Windows CE doesn't have the remove C function. // Windows CE doesn't have the remove C function.

View File

@ -40,8 +40,6 @@ Note that test sharding may also influence which tests are filtered. Therefore,
we test that here also. we test that here also.
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import re import re
import sets import sets

View File

@ -136,11 +136,11 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase):
self.assert_(p.exited) self.assert_(p.exited)
self.assertEquals(0, p.exit_code) self.assertEquals(0, p.exit_code)
# TODO(wan@google.com): libtool causes the built test binary to be # FIXME: libtool causes the built test binary to be
# named lt-gtest_xml_outfiles_test_ instead of # named lt-gtest_xml_outfiles_test_ instead of
# gtest_xml_outfiles_test_. To account for this possibility, we # gtest_xml_outfiles_test_. To account for this possibility, we
# allow both names in the following code. We should remove this # allow both names in the following code. We should remove this
# hack when Chandler Carruth's libtool replacement tool is ready. # when libtool replacement tool is ready.
output_file_name1 = test_name + '.json' output_file_name1 = test_name + '.json'
output_file1 = os.path.join(self.output_dir_, output_file_name1) output_file1 = os.path.join(self.output_dir_, output_file_name1)
output_file_name2 = 'lt-' + output_file_name1 output_file_name2 = 'lt-' + output_file_name1

View File

@ -37,8 +37,6 @@ by invoking googletest-list-tests-unittest_ (a program written with
Google Test) the command line flags. Google Test) the command line flags.
""" """
__author__ = 'phanna@google.com (Patrick Hanna)'
import re import re
import gtest_test_utils import gtest_test_utils

View File

@ -105,8 +105,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
#elif GTEST_OS_FUCHSIA #elif GTEST_OS_FUCHSIA
const bool success = exe_str == "app"; const bool success = exe_str == "app";
#else #else
// TODO(wan@google.com): remove the hard-coded "lt-" prefix when // FIXME: remove the hard-coded "lt-" prefix when libtool replacement is ready
// Chandler Carruth's libtool replacement is ready.
const bool success = const bool success =
exe_str == "googletest-options-test" || exe_str == "googletest-options-test" ||
exe_str == "gtest_all_test" || exe_str == "gtest_all_test" ||

View File

@ -38,8 +38,6 @@ googletest_output_test.py --gengolden
googletest_output_test.py googletest_output_test.py
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import difflib import difflib
import os import os
import re import re
@ -57,7 +55,7 @@ NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support'
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
IS_WINDOWS = os.name == 'nt' IS_WINDOWS = os.name == 'nt'
# TODO(vladl@google.com): remove the _lin suffix. # FIXME: remove the _lin suffix.
GOLDEN_NAME = 'googletest-output-test-golden-lin.txt' GOLDEN_NAME = 'googletest-output-test-golden-lin.txt'
PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_') PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_')

View File

@ -30,8 +30,6 @@
"""Verifies that Google Test warns the user when not initialized properly.""" """Verifies that Google Test warns the user when not initialized properly."""
__author__ = 'jmadill@google.com (Jamie Madill)'
import gtest_test_utils import gtest_test_utils
binary_name = 'googletest-param-test-invalid-name1-test_' binary_name = 'googletest-param-test-invalid-name1-test_'

View File

@ -30,8 +30,6 @@
"""Verifies that Google Test warns the user when not initialized properly.""" """Verifies that Google Test warns the user when not initialized properly."""
__author__ = 'jmadill@google.com (Jamie Madill)'
import gtest_test_utils import gtest_test_utils
binary_name = 'googletest-param-test-invalid-name2-test_' binary_name = 'googletest-param-test-invalid-name2-test_'

View File

@ -67,7 +67,7 @@ using ::testing::internal::UnitTestOptions;
// Prints a value to a string. // Prints a value to a string.
// //
// TODO(wan@google.com): remove PrintValue() when we move matchers and // FIXME: remove PrintValue() when we move matchers and
// EXPECT_THAT() from Google Mock to Google Test. At that time, we // EXPECT_THAT() from Google Mock to Google Test. At that time, we
// can write EXPECT_THAT(x, Eq(y)) to compare two tuples x and y, as // can write EXPECT_THAT(x, Eq(y)) to compare two tuples x and y, as
// EXPECT_THAT() and the matchers know how to print tuples. // EXPECT_THAT() and the matchers know how to print tuples.

View File

@ -224,7 +224,7 @@ TEST(ScopedPtrTest, DefinesElementType) {
StaticAssertTypeEq<int, ::testing::internal::scoped_ptr<int>::element_type>(); StaticAssertTypeEq<int, ::testing::internal::scoped_ptr<int>::element_type>();
} }
// TODO(vladl@google.com): Implement THE REST of scoped_ptr tests. // FIXME: Implement THE REST of scoped_ptr tests.
TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) { TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) {
if (AlwaysFalse()) if (AlwaysFalse())

View File

@ -30,8 +30,6 @@
"""Verifies that test shuffling works.""" """Verifies that test shuffling works."""
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import gtest_test_utils import gtest_test_utils

View File

@ -200,6 +200,6 @@ TEST_F(TestPartResultArrayDeathTest, DiesWhenIndexIsOutOfBound) {
EXPECT_DEATH_IF_SUPPORTED(results.GetTestPartResult(1), ""); EXPECT_DEATH_IF_SUPPORTED(results.GetTestPartResult(1), "");
} }
// TODO(mheule@google.com): Add a test for the class HasNewFatalFailureHelper. // FIXME: Add a test for the class HasNewFatalFailureHelper.
} // namespace } // namespace

View File

@ -35,8 +35,6 @@ This script invokes googletest-throw-on-failure-test_ (a program written with
Google Test) with different environments and command line flags. Google Test) with different environments and command line flags.
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import gtest_test_utils import gtest_test_utils
@ -75,7 +73,7 @@ def Run(command):
return p.exited and p.exit_code == 0 return p.exited and p.exit_code == 0
# The tests. TODO(wan@google.com): refactor the class to share common # The tests. FIXME: refactor the class to share common
# logic with code in googletest-break-on-failure-unittest.py. # logic with code in googletest-break-on-failure-unittest.py.
class ThrowOnFailureTest(gtest_test_utils.TestCase): class ThrowOnFailureTest(gtest_test_utils.TestCase):
"""Tests the throw-on-failure mode.""" """Tests the throw-on-failure mode."""

View File

@ -31,8 +31,6 @@
"""Verifies that Google Test warns the user when not initialized properly.""" """Verifies that Google Test warns the user when not initialized properly."""
__author__ = 'wan@google.com (Zhanyong Wan)'
import gtest_test_utils import gtest_test_utils
COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-uninitialized-test_') COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-uninitialized-test_')

View File

@ -97,7 +97,7 @@ TEST(Test, Test) {
int kTestForContinuingTest = 0; int kTestForContinuingTest = 0;
TEST(Test, Test2) { TEST(Test, Test2) {
// FIXME(sokolov): how to force Test2 to be after Test? // FIXME: how to force Test2 to be after Test?
kTestForContinuingTest = 1; kTestForContinuingTest = 1;
} }

View File

@ -37,8 +37,6 @@ SYNOPSIS
gtest_help_test.py gtest_help_test.py
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import re import re
import gtest_test_utils import gtest_test_utils

View File

@ -117,8 +117,7 @@ const int kNumberOfParamTests = 10;
class MyParamTest : public testing::TestWithParam<int> {}; class MyParamTest : public testing::TestWithParam<int> {};
TEST_P(MyParamTest, ShouldPass) { TEST_P(MyParamTest, ShouldPass) {
// TODO(vladl@google.com): Make parameter value checking robust // FIXME: Make parameter value checking robust WRT order of tests.
// WRT order of tests.
GTEST_CHECK_INT_EQ_(g_param_test_count % kNumberOfParamTests, GetParam()); GTEST_CHECK_INT_EQ_(g_param_test_count % kNumberOfParamTests, GetParam());
g_param_test_count++; g_param_test_count++;
} }

View File

@ -31,8 +31,6 @@
# Suppresses the 'Import not at the top of the file' lint complaint. # Suppresses the 'Import not at the top of the file' lint complaint.
# pylint: disable-msg=C6204 # pylint: disable-msg=C6204
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import sys import sys
@ -308,7 +306,7 @@ def Main():
_ParseAndStripGTestFlags(sys.argv) _ParseAndStripGTestFlags(sys.argv)
# The tested binaries should not be writing XML output files unless the # The tested binaries should not be writing XML output files unless the
# script explicitly instructs them to. # script explicitly instructs them to.
# TODO(vladl@google.com): Move this into Subprocess when we implement # FIXME: Move this into Subprocess when we implement
# passing environment into it as a parameter. # passing environment into it as a parameter.
if GTEST_OUTPUT_VAR_NAME in os.environ: if GTEST_OUTPUT_VAR_NAME in os.environ:
del os.environ[GTEST_OUTPUT_VAR_NAME] del os.environ[GTEST_OUTPUT_VAR_NAME]

View File

@ -29,8 +29,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Verifies that Google Test uses filter provided via testbridge.""" """Verifies that Google Test uses filter provided via testbridge."""
__author__ = 'rfj@google.com (Rohan Joyce)'
import os import os
import gtest_test_utils import gtest_test_utils

View File

@ -1384,8 +1384,7 @@ class TestResultTest : public Test {
// In order to test TestResult, we need to modify its internal // In order to test TestResult, we need to modify its internal
// state, in particular the TestPartResult vector it holds. // state, in particular the TestPartResult vector it holds.
// test_part_results() returns a const reference to this vector. // test_part_results() returns a const reference to this vector.
// We cast it to a non-const object s.t. it can be modified (yes, // We cast it to a non-const object s.t. it can be modified
// this is a hack).
TPRVector* results1 = const_cast<TPRVector*>( TPRVector* results1 = const_cast<TPRVector*>(
&TestResultAccessor::test_part_results(*r1)); &TestResultAccessor::test_part_results(*r1));
TPRVector* results2 = const_cast<TPRVector*>( TPRVector* results2 = const_cast<TPRVector*>(
@ -7372,7 +7371,7 @@ GTEST_TEST(AlternativeNameTest, Works) { // GTEST_TEST is the same as TEST.
// Tests for internal utilities necessary for implementation of the universal // Tests for internal utilities necessary for implementation of the universal
// printing. // printing.
// TODO(vladl@google.com): Find a better home for them. // FIXME: Find a better home for them.
class ConversionHelperBase {}; class ConversionHelperBase {};
class ConversionHelperDerived : public ConversionHelperBase {}; class ConversionHelperDerived : public ConversionHelperBase {};

View File

@ -111,11 +111,11 @@ class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase):
self.assert_(p.exited) self.assert_(p.exited)
self.assertEquals(0, p.exit_code) self.assertEquals(0, p.exit_code)
# TODO(wan@google.com): libtool causes the built test binary to be # FIXME: libtool causes the built test binary to be
# named lt-gtest_xml_outfiles_test_ instead of # named lt-gtest_xml_outfiles_test_ instead of
# gtest_xml_outfiles_test_. To account for this possibility, we # gtest_xml_outfiles_test_. To account for this possibility, we
# allow both names in the following code. We should remove this # allow both names in the following code. We should remove this
# hack when Chandler Carruth's libtool replacement tool is ready. # when libtool replacement tool is ready.
output_file_name1 = test_name + ".xml" output_file_name1 = test_name + ".xml"
output_file1 = os.path.join(self.output_dir_, output_file_name1) output_file1 = os.path.join(self.output_dir_, output_file_name1)
output_file_name2 = 'lt-' + output_file_name1 output_file_name2 = 'lt-' + output_file_name1