|
|
|
@ -54,8 +54,6 @@ |
|
|
|
|
|
|
|
|
|
#if GTEST_OS_LINUX |
|
|
|
|
|
|
|
|
|
// FIXME: Use autoconf to detect availability of
|
|
|
|
|
// gettimeofday().
|
|
|
|
|
# define GTEST_HAS_GETTIMEOFDAY_ 1 |
|
|
|
|
|
|
|
|
|
# include <fcntl.h> // NOLINT
|
|
|
|
@ -89,11 +87,6 @@ |
|
|
|
|
|
|
|
|
|
# if GTEST_OS_WINDOWS_MINGW |
|
|
|
|
// MinGW has gettimeofday() but not _ftime64().
|
|
|
|
|
// FIXME: Use autoconf to detect availability of
|
|
|
|
|
// gettimeofday().
|
|
|
|
|
// FIXME: There are other ways to get the time on
|
|
|
|
|
// Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW
|
|
|
|
|
// supports these. consider using them instead.
|
|
|
|
|
# define GTEST_HAS_GETTIMEOFDAY_ 1 |
|
|
|
|
# include <sys/time.h> // NOLINT
|
|
|
|
|
# endif // GTEST_OS_WINDOWS_MINGW
|
|
|
|
@ -106,8 +99,6 @@ |
|
|
|
|
#else |
|
|
|
|
|
|
|
|
|
// Assume other platforms have gettimeofday().
|
|
|
|
|
// FIXME: Use autoconf to detect availability of
|
|
|
|
|
// gettimeofday().
|
|
|
|
|
# define GTEST_HAS_GETTIMEOFDAY_ 1 |
|
|
|
|
|
|
|
|
|
// cpplint thinks that the header is already included, so we want to
|
|
|
|
@ -477,10 +468,6 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() { |
|
|
|
|
|
|
|
|
|
internal::FilePath output_name(colon + 1); |
|
|
|
|
if (!output_name.IsAbsolutePath()) |
|
|
|
|
// FIXME: on Windows \some\path is not an absolute
|
|
|
|
|
// path (as its meaning depends on the current drive), yet the
|
|
|
|
|
// following logic for turning it into an absolute path is wrong.
|
|
|
|
|
// Fix it.
|
|
|
|
|
output_name = internal::FilePath::ConcatPaths( |
|
|
|
|
internal::FilePath(UnitTest::GetInstance()->original_working_dir()), |
|
|
|
|
internal::FilePath(colon + 1)); |
|
|
|
@ -856,8 +843,6 @@ TimeInMillis GetTimeInMillis() { |
|
|
|
|
SYSTEMTIME now_systime; |
|
|
|
|
FILETIME now_filetime; |
|
|
|
|
ULARGE_INTEGER now_int64; |
|
|
|
|
// FIXME: Shouldn't this just use
|
|
|
|
|
// GetSystemTimeAsFileTime()?
|
|
|
|
|
GetSystemTime(&now_systime); |
|
|
|
|
if (SystemTimeToFileTime(&now_systime, &now_filetime)) { |
|
|
|
|
now_int64.LowPart = now_filetime.dwLowDateTime; |
|
|
|
@ -872,8 +857,6 @@ TimeInMillis GetTimeInMillis() { |
|
|
|
|
|
|
|
|
|
// MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996
|
|
|
|
|
// (deprecated function) there.
|
|
|
|
|
// FIXME: Use GetTickCount()? Or use
|
|
|
|
|
// SystemTimeToFileTime()
|
|
|
|
|
GTEST_DISABLE_MSC_DEPRECATED_PUSH_() |
|
|
|
|
_ftime64(&now); |
|
|
|
|
GTEST_DISABLE_MSC_DEPRECATED_POP_() |
|
|
|
@ -1407,8 +1390,6 @@ AssertionResult DoubleNearPredFormat(const char* expr1, |
|
|
|
|
const double diff = fabs(val1 - val2); |
|
|
|
|
if (diff <= abs_error) return AssertionSuccess(); |
|
|
|
|
|
|
|
|
|
// FIXME: do not print the value of an expression if it's
|
|
|
|
|
// already a literal.
|
|
|
|
|
return AssertionFailure() |
|
|
|
|
<< "The difference between " << expr1 << " and " << expr2 |
|
|
|
|
<< " is " << diff << ", which exceeds " << abs_error_expr << ", where\n" |
|
|
|
@ -3388,7 +3369,6 @@ void TestEventRepeater::Append(TestEventListener *listener) { |
|
|
|
|
listeners_.push_back(listener); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// FIXME: Factor the search functionality into Vector::Find.
|
|
|
|
|
TestEventListener* TestEventRepeater::Release(TestEventListener *listener) { |
|
|
|
|
for (size_t i = 0; i < listeners_.size(); ++i) { |
|
|
|
|
if (listeners_[i] == listener) { |
|
|
|
@ -3576,8 +3556,6 @@ void XmlUnitTestResultPrinter::ListTestsMatchingFilter( |
|
|
|
|
// module will consist of ordinary English text.
|
|
|
|
|
// If this module is ever modified to produce version 1.1 XML output,
|
|
|
|
|
// most invalid characters can be retained using character references.
|
|
|
|
|
// FIXME: It might be nice to have a minimally invasive, human-readable
|
|
|
|
|
// escaping scheme for invalid characters, rather than dropping them.
|
|
|
|
|
std::string XmlUnitTestResultPrinter::EscapeXml( |
|
|
|
|
const std::string& str, bool is_attribute) { |
|
|
|
|
Message m; |
|
|
|
@ -3726,7 +3704,6 @@ void XmlUnitTestResultPrinter::OutputXmlAttribute( |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Prints an XML representation of a TestInfo object.
|
|
|
|
|
// FIXME: There is also value in printing properties with the plain printer.
|
|
|
|
|
void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream, |
|
|
|
|
const char* test_case_name, |
|
|
|
|
const TestInfo& test_info) { |
|
|
|
@ -5717,8 +5694,6 @@ static bool HasGoogleTestFlagPrefix(const char* str) { |
|
|
|
|
// @Y changes the color to yellow.
|
|
|
|
|
// @D changes to the default terminal text color.
|
|
|
|
|
//
|
|
|
|
|
// FIXME: Write tests for this once we add stdout
|
|
|
|
|
// capturing to Google Test.
|
|
|
|
|
static void PrintColorEncoded(const char* str) { |
|
|
|
|
GTestColor color = COLOR_DEFAULT; // The current color.
|
|
|
|
|
|
|
|
|
|