Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
14c2fba7
Commit
14c2fba7
authored
Jan 02, 2019
by
misterg
Committed by
Gennadiy Civil
Jan 02, 2019
Browse files
Googletest export
Internal Change PiperOrigin-RevId: 227575279
parent
f8b1c1af
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
0 additions
and
92 deletions
+0
-92
googlemock/include/gmock/gmock-matchers.h
googlemock/include/gmock/gmock-matchers.h
+0
-3
googlemock/include/gmock/gmock-spec-builders.h
googlemock/include/gmock/gmock-spec-builders.h
+0
-4
googlemock/include/gmock/internal/gmock-internal-utils.h
googlemock/include/gmock/internal/gmock-internal-utils.h
+0
-2
googlemock/src/gmock-spec-builders.cc
googlemock/src/gmock-spec-builders.cc
+0
-3
googlemock/src/gmock.cc
googlemock/src/gmock.cc
+0
-3
googlemock/test/gmock-actions_test.cc
googlemock/test/gmock-actions_test.cc
+0
-4
googletest/include/gtest/gtest-death-test.h
googletest/include/gtest/gtest-death-test.h
+0
-1
googletest/include/gtest/gtest-matchers.h
googletest/include/gtest/gtest-matchers.h
+0
-4
googletest/include/gtest/gtest-printers.h
googletest/include/gtest/gtest-printers.h
+0
-1
googletest/include/gtest/gtest.h
googletest/include/gtest/gtest.h
+0
-1
googletest/include/gtest/internal/gtest-port.h
googletest/include/gtest/internal/gtest-port.h
+0
-13
googletest/src/gtest-death-test.cc
googletest/src/gtest-death-test.cc
+0
-4
googletest/src/gtest-filepath.cc
googletest/src/gtest-filepath.cc
+0
-4
googletest/src/gtest-internal-inl.h
googletest/src/gtest-internal-inl.h
+0
-2
googletest/src/gtest-port.cc
googletest/src/gtest-port.cc
+0
-7
googletest/src/gtest-printers.cc
googletest/src/gtest-printers.cc
+0
-1
googletest/src/gtest.cc
googletest/src/gtest.cc
+0
-25
googletest/test/googletest-death-test-test.cc
googletest/test/googletest-death-test-test.cc
+0
-3
googletest/test/googletest-filepath-test.cc
googletest/test/googletest-filepath-test.cc
+0
-2
googletest/test/googletest-json-outfiles-test.py
googletest/test/googletest-json-outfiles-test.py
+0
-5
No files found.
googlemock/include/gmock/gmock-matchers.h
View file @
14c2fba7
...
@@ -382,8 +382,6 @@ class TuplePrefix {
...
@@ -382,8 +382,6 @@ class TuplePrefix {
const
Value
&
value
=
std
::
get
<
N
-
1
>
(
values
);
const
Value
&
value
=
std
::
get
<
N
-
1
>
(
values
);
StringMatchResultListener
listener
;
StringMatchResultListener
listener
;
if
(
!
matcher
.
MatchAndExplain
(
value
,
&
listener
))
{
if
(
!
matcher
.
MatchAndExplain
(
value
,
&
listener
))
{
// FIXME: include in the message the name of the parameter
// as used in MOCK_METHOD*() when possible.
*
os
<<
" Expected arg #"
<<
N
-
1
<<
": "
;
*
os
<<
" Expected arg #"
<<
N
-
1
<<
": "
;
std
::
get
<
N
-
1
>
(
matchers
).
DescribeTo
(
os
);
std
::
get
<
N
-
1
>
(
matchers
).
DescribeTo
(
os
);
*
os
<<
"
\n
Actual: "
;
*
os
<<
"
\n
Actual: "
;
...
@@ -1657,7 +1655,6 @@ class WhenDynamicCastToMatcher : public WhenDynamicCastToMatcherBase<To> {
...
@@ -1657,7 +1655,6 @@ 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
{
// 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
);
}
}
...
...
googlemock/include/gmock/gmock-spec-builders.h
View file @
14c2fba7
...
@@ -186,7 +186,6 @@ class GTEST_API_ UntypedFunctionMockerBase {
...
@@ -186,7 +186,6 @@ 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.
// 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
);
...
@@ -1197,9 +1196,6 @@ class TypedExpectation : public ExpectationBase {
...
@@ -1197,9 +1196,6 @@ class TypedExpectation : public ExpectationBase {
mocker
->
DescribeDefaultActionTo
(
args
,
what
);
mocker
->
DescribeDefaultActionTo
(
args
,
what
);
DescribeCallCountTo
(
why
);
DescribeCallCountTo
(
why
);
// FIXME: allow the user to control whether
// unexpected calls should fail immediately or continue using a
// flag --gmock_unexpected_calls_are_fatal.
return
nullptr
;
return
nullptr
;
}
}
...
...
googlemock/include/gmock/internal/gmock-internal-utils.h
View file @
14c2fba7
...
@@ -346,8 +346,6 @@ class WithoutMatchers {
...
@@ -346,8 +346,6 @@ 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
();
// FIXME: group all type utilities together.
// Type traits.
// Type traits.
// is_reference<T>::value is non-zero iff T is a reference type.
// is_reference<T>::value is non-zero iff T is a reference type.
...
...
googlemock/src/gmock-spec-builders.cc
View file @
14c2fba7
...
@@ -790,9 +790,6 @@ void Mock::RegisterUseByOnCallOrExpectCall(const void* mock_obj,
...
@@ -790,9 +790,6 @@ 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
!=
nullptr
)
{
if
(
test_info
!=
nullptr
)
{
// FIXME: record the test case name when the
// ON_CALL or EXPECT_CALL is invoked from SetUpTestCase() or
// TearDownTestCase().
state
.
first_used_test_case
=
test_info
->
test_case_name
();
state
.
first_used_test_case
=
test_info
->
test_case_name
();
state
.
first_used_test
=
test_info
->
name
();
state
.
first_used_test
=
test_info
->
name
();
}
}
...
...
googlemock/src/gmock.cc
View file @
14c2fba7
...
@@ -33,9 +33,6 @@
...
@@ -33,9 +33,6 @@
namespace
testing
{
namespace
testing
{
// FIXME: support using environment variables to
// control the flag values, like what Google Test does.
GMOCK_DEFINE_bool_
(
catch_leaked_mocks
,
true
,
GMOCK_DEFINE_bool_
(
catch_leaked_mocks
,
true
,
"true iff Google Mock should report leaked mock objects "
"true iff Google Mock should report leaked mock objects "
"as failures."
);
"as failures."
);
...
...
googlemock/test/gmock-actions_test.cc
View file @
14c2fba7
...
@@ -1438,10 +1438,6 @@ TEST(FunctorActionTest, UnusedArguments) {
...
@@ -1438,10 +1438,6 @@ 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.
// FIXME: Currently, almost all ActionInterface-based actions will not
// 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 -
// so maybe it's better to make users use lambdas instead.
TEST
(
MoveOnlyArgumentsTest
,
ReturningActions
)
{
TEST
(
MoveOnlyArgumentsTest
,
ReturningActions
)
{
Action
<
int
(
std
::
unique_ptr
<
int
>
)
>
a
=
Return
(
1
);
Action
<
int
(
std
::
unique_ptr
<
int
>
)
>
a
=
Return
(
1
);
EXPECT_EQ
(
1
,
a
.
Perform
(
std
::
make_tuple
(
nullptr
)));
EXPECT_EQ
(
1
,
a
.
Perform
(
std
::
make_tuple
(
nullptr
)));
...
...
googletest/include/gtest/gtest-death-test.h
View file @
14c2fba7
...
@@ -161,7 +161,6 @@ GTEST_API_ bool InDeathTestChild();
...
@@ -161,7 +161,6 @@ 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.
//
//
// 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
...
...
googletest/include/gtest/gtest-matchers.h
View file @
14c2fba7
...
@@ -69,10 +69,6 @@ namespace testing {
...
@@ -69,10 +69,6 @@ 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.
//
//
// FIXME: add method
// bool InterestedInWhy(bool result) const;
// to indicate whether the listener is interested in why the match
// result is 'result'.
class
MatchResultListener
{
class
MatchResultListener
{
public:
public:
// Creates a listener object with the given underlying ostream. The
// Creates a listener object with the given underlying ostream. The
...
...
googletest/include/gtest/gtest-printers.h
View file @
14c2fba7
...
@@ -761,7 +761,6 @@ void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
...
@@ -761,7 +761,6 @@ 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.
// 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
{
...
...
googletest/include/gtest/gtest.h
View file @
14c2fba7
...
@@ -329,7 +329,6 @@ class GTEST_API_ AssertionResult {
...
@@ -329,7 +329,6 @@ class GTEST_API_ AssertionResult {
const
char
*
message
()
const
{
const
char
*
message
()
const
{
return
message_
.
get
()
!=
nullptr
?
message_
->
c_str
()
:
""
;
return
message_
.
get
()
!=
nullptr
?
message_
->
c_str
()
:
""
;
}
}
// 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
();
}
...
...
googletest/include/gtest/internal/gtest-port.h
View file @
14c2fba7
...
@@ -457,9 +457,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
...
@@ -457,9 +457,6 @@ 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.
// FIXME: uses autoconf to detect whether ::std::wstring
// is available.
// Cygwin 1.7 and below doesn't support ::std::wstring.
// Cygwin 1.7 and below doesn't support ::std::wstring.
// Solaris' libc++ doesn't support it either. Android has
// Solaris' libc++ doesn't support it either. Android has
// no support for it at least as recent as Froyo (2.2).
// no support for it at least as recent as Froyo (2.2).
...
@@ -926,9 +923,6 @@ class GTEST_API_ RE {
...
@@ -926,9 +923,6 @@ class GTEST_API_ RE {
// the entire str.
// the entire str.
// 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).
//
// FIXME: make FullMatch() and PartialMatch() work
// 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
);
}
}
...
@@ -952,10 +946,6 @@ class GTEST_API_ RE {
...
@@ -952,10 +946,6 @@ class GTEST_API_ RE {
private:
private:
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
// used where std::string is not available. FIXME: change to
// std::string.
const
char
*
pattern_
;
const
char
*
pattern_
;
bool
is_valid_
;
bool
is_valid_
;
...
@@ -2293,9 +2283,6 @@ typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
...
@@ -2293,9 +2283,6 @@ 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.
// 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
// function.
bool
ParseInt32
(
const
Message
&
src_text
,
const
char
*
str
,
Int32
*
value
);
bool
ParseInt32
(
const
Message
&
src_text
,
const
char
*
str
,
Int32
*
value
);
// Parses a bool/Int32/string from the environment variable
// Parses a bool/Int32/string from the environment variable
...
...
googletest/src/gtest-death-test.cc
View file @
14c2fba7
...
@@ -274,8 +274,6 @@ static const int kFuchsiaReadPipeFd = 3;
...
@@ -274,8 +274,6 @@ 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.
// FIXME: Unify names and possibly values for
// AbortReason, DeathTestOutcome, and flag characters above.
enum
DeathTestOutcome
{
IN_PROGRESS
,
DIED
,
LIVED
,
RETURNED
,
THREW
};
enum
DeathTestOutcome
{
IN_PROGRESS
,
DIED
,
LIVED
,
RETURNED
,
THREW
};
// Routine for aborting the program which is safe to call from an
// Routine for aborting the program which is safe to call from an
...
@@ -1523,8 +1521,6 @@ static int GetStatusFileDescriptor(unsigned int parent_process_id,
...
@@ -1523,8 +1521,6 @@ static int GetStatusFileDescriptor(unsigned int parent_process_id,
StreamableToString
(
parent_process_id
));
StreamableToString
(
parent_process_id
));
}
}
// FIXME: Replace the following check with a
// compile-time assertion when available.
GTEST_CHECK_
(
sizeof
(
HANDLE
)
<=
sizeof
(
size_t
));
GTEST_CHECK_
(
sizeof
(
HANDLE
)
<=
sizeof
(
size_t
));
const
HANDLE
write_handle
=
const
HANDLE
write_handle
=
...
...
googletest/src/gtest-filepath.cc
View file @
14c2fba7
...
@@ -247,9 +247,6 @@ bool FilePath::DirectoryExists() const {
...
@@ -247,9 +247,6 @@ 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
// FIXME: on Windows a network share like
// \\server\share can be a root directory, although it cannot be the
// current directory. Handle this properly.
return
pathname_
.
length
()
==
3
&&
IsAbsolutePath
();
return
pathname_
.
length
()
==
3
&&
IsAbsolutePath
();
#else
#else
return
pathname_
.
length
()
==
1
&&
IsPathSeparator
(
pathname_
.
c_str
()[
0
]);
return
pathname_
.
length
()
==
1
&&
IsPathSeparator
(
pathname_
.
c_str
()[
0
]);
...
@@ -347,7 +344,6 @@ FilePath FilePath::RemoveTrailingPathSeparator() const {
...
@@ -347,7 +344,6 @@ 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 "..".
// FIXME: handle Windows network shares (e.g. \\server\share).
void
FilePath
::
Normalize
()
{
void
FilePath
::
Normalize
()
{
if
(
pathname_
.
c_str
()
==
nullptr
)
{
if
(
pathname_
.
c_str
()
==
nullptr
)
{
pathname_
=
""
;
pathname_
=
""
;
...
...
googletest/src/gtest-internal-inl.h
View file @
14c2fba7
...
@@ -998,8 +998,6 @@ bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
...
@@ -998,8 +998,6 @@ bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
const
bool
parse_success
=
*
end
==
'\0'
&&
errno
==
0
;
const
bool
parse_success
=
*
end
==
'\0'
&&
errno
==
0
;
// FIXME: Convert this to compile time assertion when it is
// available.
GTEST_CHECK_
(
sizeof
(
Integer
)
<=
sizeof
(
parsed
));
GTEST_CHECK_
(
sizeof
(
Integer
)
<=
sizeof
(
parsed
));
const
Integer
result
=
static_cast
<
Integer
>
(
parsed
);
const
Integer
result
=
static_cast
<
Integer
>
(
parsed
);
...
...
googletest/src/gtest-port.cc
View file @
14c2fba7
...
@@ -265,9 +265,6 @@ Mutex::Mutex()
...
@@ -265,9 +265,6 @@ 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.
// FIXME: Switch to Slim Reader/Writer (SRW) Locks, which requires
// 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
if
(
type_
==
kDynamic
)
{
if
(
type_
==
kDynamic
)
{
::
DeleteCriticalSection
(
critical_section_
);
::
DeleteCriticalSection
(
critical_section_
);
delete
critical_section_
;
delete
critical_section_
;
...
@@ -388,7 +385,6 @@ class ThreadWithParamSupport : public ThreadWithParamBase {
...
@@ -388,7 +385,6 @@ 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
;
// FIXME: Consider to use _beginthreadex instead.
HANDLE
thread_handle
=
::
CreateThread
(
HANDLE
thread_handle
=
::
CreateThread
(
nullptr
,
// Default security.
nullptr
,
// Default security.
0
,
// Default stack size.
0
,
// Default stack size.
...
@@ -741,9 +737,6 @@ static std::string FormatRegexSyntaxError(const char* regex, int index) {
...
@@ -741,9 +737,6 @@ 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
==
nullptr
)
{
if
(
regex
==
nullptr
)
{
// FIXME: fix the source file location in the
// assertion failures to match where the regex is used in user
// code.
ADD_FAILURE
()
<<
"NULL is not a valid simple regular expression."
;
ADD_FAILURE
()
<<
"NULL is not a valid simple regular expression."
;
return
false
;
return
false
;
}
}
...
...
googletest/src/gtest-printers.cc
View file @
14c2fba7
...
@@ -89,7 +89,6 @@ void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
...
@@ -89,7 +89,6 @@ 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.
// 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
{
...
...
googletest/src/gtest.cc
View file @
14c2fba7
...
@@ -54,8 +54,6 @@
...
@@ -54,8 +54,6 @@
#if GTEST_OS_LINUX
#if GTEST_OS_LINUX
// FIXME: Use autoconf to detect availability of
// gettimeofday().
# define GTEST_HAS_GETTIMEOFDAY_ 1
# define GTEST_HAS_GETTIMEOFDAY_ 1
# include <fcntl.h> // NOLINT
# include <fcntl.h> // NOLINT
...
@@ -89,11 +87,6 @@
...
@@ -89,11 +87,6 @@
# if GTEST_OS_WINDOWS_MINGW
# if GTEST_OS_WINDOWS_MINGW
// MinGW has gettimeofday() but not _ftime64().
// 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
# define GTEST_HAS_GETTIMEOFDAY_ 1
# include <sys/time.h> // NOLINT
# include <sys/time.h> // NOLINT
# endif // GTEST_OS_WINDOWS_MINGW
# endif // GTEST_OS_WINDOWS_MINGW
...
@@ -106,8 +99,6 @@
...
@@ -106,8 +99,6 @@
#else
#else
// Assume other platforms have gettimeofday().
// Assume other platforms have gettimeofday().
// FIXME: Use autoconf to detect availability of
// gettimeofday().
# define GTEST_HAS_GETTIMEOFDAY_ 1
# define GTEST_HAS_GETTIMEOFDAY_ 1
// cpplint thinks that the header is already included, so we want to
// cpplint thinks that the header is already included, so we want to
...
@@ -477,10 +468,6 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() {
...
@@ -477,10 +468,6 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() {
internal
::
FilePath
output_name
(
colon
+
1
);
internal
::
FilePath
output_name
(
colon
+
1
);
if
(
!
output_name
.
IsAbsolutePath
())
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
(
output_name
=
internal
::
FilePath
::
ConcatPaths
(
internal
::
FilePath
(
UnitTest
::
GetInstance
()
->
original_working_dir
()),
internal
::
FilePath
(
UnitTest
::
GetInstance
()
->
original_working_dir
()),
internal
::
FilePath
(
colon
+
1
));
internal
::
FilePath
(
colon
+
1
));
...
@@ -856,8 +843,6 @@ TimeInMillis GetTimeInMillis() {
...
@@ -856,8 +843,6 @@ TimeInMillis GetTimeInMillis() {
SYSTEMTIME
now_systime
;
SYSTEMTIME
now_systime
;
FILETIME
now_filetime
;
FILETIME
now_filetime
;
ULARGE_INTEGER
now_int64
;
ULARGE_INTEGER
now_int64
;
// FIXME: Shouldn't this just use
// GetSystemTimeAsFileTime()?
GetSystemTime
(
&
now_systime
);
GetSystemTime
(
&
now_systime
);
if
(
SystemTimeToFileTime
(
&
now_systime
,
&
now_filetime
))
{
if
(
SystemTimeToFileTime
(
&
now_systime
,
&
now_filetime
))
{
now_int64
.
LowPart
=
now_filetime
.
dwLowDateTime
;
now_int64
.
LowPart
=
now_filetime
.
dwLowDateTime
;
...
@@ -872,8 +857,6 @@ TimeInMillis GetTimeInMillis() {
...
@@ -872,8 +857,6 @@ 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.
// FIXME: Use GetTickCount()? Or use
// SystemTimeToFileTime()
GTEST_DISABLE_MSC_DEPRECATED_PUSH_
()
GTEST_DISABLE_MSC_DEPRECATED_PUSH_
()
_ftime64
(
&
now
);
_ftime64
(
&
now
);
GTEST_DISABLE_MSC_DEPRECATED_POP_
()
GTEST_DISABLE_MSC_DEPRECATED_POP_
()
...
@@ -1407,8 +1390,6 @@ AssertionResult DoubleNearPredFormat(const char* expr1,
...
@@ -1407,8 +1390,6 @@ 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
();
// FIXME: do not print the value of an expression if it's
// already a literal.
return
AssertionFailure
()
return
AssertionFailure
()
<<
"The difference between "
<<
expr1
<<
" and "
<<
expr2
<<
"The difference between "
<<
expr1
<<
" and "
<<
expr2
<<
" is "
<<
diff
<<
", which exceeds "
<<
abs_error_expr
<<
", where
\n
"
<<
" is "
<<
diff
<<
", which exceeds "
<<
abs_error_expr
<<
", where
\n
"
...
@@ -3388,7 +3369,6 @@ void TestEventRepeater::Append(TestEventListener *listener) {
...
@@ -3388,7 +3369,6 @@ void TestEventRepeater::Append(TestEventListener *listener) {
listeners_
.
push_back
(
listener
);
listeners_
.
push_back
(
listener
);
}
}
// 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
)
{
...
@@ -3576,8 +3556,6 @@ void XmlUnitTestResultPrinter::ListTestsMatchingFilter(
...
@@ -3576,8 +3556,6 @@ void XmlUnitTestResultPrinter::ListTestsMatchingFilter(
// 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.
// 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
(
std
::
string
XmlUnitTestResultPrinter
::
EscapeXml
(
const
std
::
string
&
str
,
bool
is_attribute
)
{
const
std
::
string
&
str
,
bool
is_attribute
)
{
Message
m
;
Message
m
;
...
@@ -3726,7 +3704,6 @@ void XmlUnitTestResultPrinter::OutputXmlAttribute(
...
@@ -3726,7 +3704,6 @@ void XmlUnitTestResultPrinter::OutputXmlAttribute(
}
}
// Prints an XML representation of a TestInfo object.
// 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
,
void
XmlUnitTestResultPrinter
::
OutputXmlTestInfo
(
::
std
::
ostream
*
stream
,
const
char
*
test_case_name
,
const
char
*
test_case_name
,
const
TestInfo
&
test_info
)
{
const
TestInfo
&
test_info
)
{
...
@@ -5717,8 +5694,6 @@ static bool HasGoogleTestFlagPrefix(const char* str) {
...
@@ -5717,8 +5694,6 @@ 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.
//
//
// FIXME: Write tests for this once we add stdout
// 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.
...
...
googletest/test/googletest-death-test-test.cc
View file @
14c2fba7
...
@@ -1281,9 +1281,6 @@ TEST(ParseNaturalNumberTest, WorksForShorterIntegers) {
...
@@ -1281,9 +1281,6 @@ TEST(ParseNaturalNumberTest, WorksForShorterIntegers) {
# if GTEST_OS_WINDOWS
# if GTEST_OS_WINDOWS
TEST
(
EnvironmentTest
,
HandleFitsIntoSizeT
)
{
TEST
(
EnvironmentTest
,
HandleFitsIntoSizeT
)
{
// FIXME: Remove this test after this condition is verified
// in a static assertion in gtest-death-test.cc in the function
// GetStatusFileDescriptor.
ASSERT_TRUE
(
sizeof
(
HANDLE
)
<=
sizeof
(
size_t
));
ASSERT_TRUE
(
sizeof
(
HANDLE
)
<=
sizeof
(
size_t
));
}
}
# endif // GTEST_OS_WINDOWS
# endif // GTEST_OS_WINDOWS
...
...
googletest/test/googletest-filepath-test.cc
View file @
14c2fba7
...
@@ -50,8 +50,6 @@ namespace internal {
...
@@ -50,8 +50,6 @@ namespace internal {
namespace
{
namespace
{
#if GTEST_OS_WINDOWS_MOBILE
#if GTEST_OS_WINDOWS_MOBILE
// FIXME: Move these to the POSIX adapter section in
// gtest-port.h.
// Windows CE doesn't have the remove C function.
// Windows CE doesn't have the remove C function.
int
remove
(
const
char
*
path
)
{
int
remove
(
const
char
*
path
)
{
...
...
googletest/test/googletest-json-outfiles-test.py
View file @
14c2fba7
...
@@ -136,11 +136,6 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase):
...
@@ -136,11 +136,6 @@ 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
)
# FIXME: libtool causes the built test binary to be
# named lt-gtest_xml_outfiles_test_ instead of
# gtest_xml_outfiles_test_. To account for this possibility, we
# allow both names in the following code. We should remove this
# 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
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment