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
3c4f437c
Unverified
Commit
3c4f437c
authored
Aug 15, 2018
by
Gennadiy Civil
Committed by
GitHub
Aug 15, 2018
Browse files
Merge branch 'master' into master
parents
87a37c60
997d343d
Changes
174
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
39 additions
and
66 deletions
+39
-66
googletest/src/gtest-internal-inl.h
googletest/src/gtest-internal-inl.h
+2
-5
googletest/src/gtest-port.cc
googletest/src/gtest-port.cc
+6
-7
googletest/src/gtest-printers.cc
googletest/src/gtest-printers.cc
+2
-3
googletest/src/gtest-test-part.cc
googletest/src/gtest-test-part.cc
+1
-2
googletest/src/gtest-typed-test.cc
googletest/src/gtest-typed-test.cc
+1
-2
googletest/src/gtest.cc
googletest/src/gtest.cc
+18
-19
googletest/src/gtest_main.cc
googletest/src/gtest_main.cc
+0
-1
googletest/test/googletest-break-on-failure-unittest.py
googletest/test/googletest-break-on-failure-unittest.py
+0
-2
googletest/test/googletest-break-on-failure-unittest_.cc
googletest/test/googletest-break-on-failure-unittest_.cc
+1
-2
googletest/test/googletest-catch-exceptions-test.py
googletest/test/googletest-catch-exceptions-test.py
+0
-2
googletest/test/googletest-catch-exceptions-test_.cc
googletest/test/googletest-catch-exceptions-test_.cc
+1
-2
googletest/test/googletest-color-test.py
googletest/test/googletest-color-test.py
+0
-2
googletest/test/googletest-color-test_.cc
googletest/test/googletest-color-test_.cc
+1
-2
googletest/test/googletest-death-test-test.cc
googletest/test/googletest-death-test-test.cc
+2
-3
googletest/test/googletest-death-test_ex_test.cc
googletest/test/googletest-death-test_ex_test.cc
+1
-2
googletest/test/googletest-env-var-test.py
googletest/test/googletest-env-var-test.py
+0
-2
googletest/test/googletest-env-var-test_.cc
googletest/test/googletest-env-var-test_.cc
+1
-2
googletest/test/googletest-filepath-test.cc
googletest/test/googletest-filepath-test.cc
+1
-2
googletest/test/googletest-filter-unittest.py
googletest/test/googletest-filter-unittest.py
+0
-2
googletest/test/googletest-filter-unittest_.cc
googletest/test/googletest-filter-unittest_.cc
+1
-2
No files found.
googletest/src/gtest-internal-inl.h
View file @
3c4f437c
...
@@ -27,10 +27,7 @@
...
@@ -27,10 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Utility functions and classes used by the Google C++ testing framework.
// Utility functions and classes used by the Google C++ testing framework.//
//
// Author: wan@google.com (Zhanyong Wan)
//
// This file contains purely Google Test's internal implementation. Please
// This file contains purely Google Test's internal implementation. Please
// DO NOT #INCLUDE IT IN A USER PROGRAM.
// DO NOT #INCLUDE IT IN A USER PROGRAM.
...
@@ -994,7 +991,7 @@ bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
...
@@ -994,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
));
...
...
googletest/src/gtest-port.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
#include "gtest/internal/gtest-port.h"
#include "gtest/internal/gtest-port.h"
...
@@ -262,7 +261,7 @@ Mutex::Mutex()
...
@@ -262,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
)
{
...
@@ -344,7 +343,7 @@ class ThreadWithParamSupport : public ThreadWithParamBase {
...
@@ -344,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.
...
@@ -696,7 +695,7 @@ static std::string FormatRegexSyntaxError(const char* regex, int index) {
...
@@ -696,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."
;
...
@@ -942,7 +941,7 @@ GTestLog::~GTestLog() {
...
@@ -942,7 +941,7 @@ GTestLog::~GTestLog() {
// Disable Microsoft deprecation warnings for POSIX functions called from
// Disable Microsoft deprecation warnings for POSIX functions called from
// this class (creat, dup, dup2, and close)
// this class (creat, dup, dup2, and close)
GTEST_DISABLE_MSC_
WARNINGS
_PUSH_
(
4996
)
GTEST_DISABLE_MSC_
DEPRECATED
_PUSH_
()
#if GTEST_HAS_STREAM_REDIRECTION
#if GTEST_HAS_STREAM_REDIRECTION
...
@@ -1026,7 +1025,7 @@ class CapturedStream {
...
@@ -1026,7 +1025,7 @@ class CapturedStream {
GTEST_DISALLOW_COPY_AND_ASSIGN_
(
CapturedStream
);
GTEST_DISALLOW_COPY_AND_ASSIGN_
(
CapturedStream
);
};
};
GTEST_DISABLE_MSC_
WARNINGS
_POP_
()
GTEST_DISABLE_MSC_
DEPRECATED
_POP_
()
static
CapturedStream
*
g_captured_stderr
=
NULL
;
static
CapturedStream
*
g_captured_stderr
=
NULL
;
static
CapturedStream
*
g_captured_stdout
=
NULL
;
static
CapturedStream
*
g_captured_stdout
=
NULL
;
...
...
googletest/src/gtest-printers.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Test - The Google C++ Testing and Mocking Framework
// Google Test - The Google C++ Testing and Mocking Framework
//
//
...
@@ -90,7 +89,7 @@ void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
...
@@ -90,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
{
...
...
googletest/src/gtest-test-part.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: mheule@google.com (Markus Heule)
//
//
// The Google C++ Testing and Mocking Framework (Google Test)
// The Google C++ Testing and Mocking Framework (Google Test)
...
...
googletest/src/gtest-typed-test.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
#include "gtest/gtest-typed-test.h"
#include "gtest/gtest-typed-test.h"
...
...
googletest/src/gtest.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
//
//
// The Google C++ Testing and Mocking Framework (Google Test)
// The Google C++ Testing and Mocking Framework (Google Test)
...
@@ -55,7 +54,7 @@
...
@@ -55,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
...
@@ -94,9 +93,9 @@
...
@@ -94,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
...
@@ -111,7 +110,7 @@
...
@@ -111,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
...
@@ -468,7 +467,7 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() {
...
@@ -468,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.
...
@@ -842,7 +841,7 @@ TimeInMillis GetTimeInMillis() {
...
@@ -842,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
))
{
...
@@ -858,11 +857,11 @@ TimeInMillis GetTimeInMillis() {
...
@@ -858,11 +857,11 @@ 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_
WARNINGS
_PUSH_
(
4996
)
GTEST_DISABLE_MSC_
DEPRECATED
_PUSH_
()
_ftime64
(
&
now
);
_ftime64
(
&
now
);
GTEST_DISABLE_MSC_
WARNINGS
_POP_
()
GTEST_DISABLE_MSC_
DEPRECATED
_POP_
()
return
static_cast
<
TimeInMillis
>
(
now
.
time
)
*
1000
+
now
.
millitm
;
return
static_cast
<
TimeInMillis
>
(
now
.
time
)
*
1000
+
now
.
millitm
;
#elif GTEST_HAS_GETTIMEOFDAY_
#elif GTEST_HAS_GETTIMEOFDAY_
...
@@ -1397,7 +1396,7 @@ AssertionResult DoubleNearPredFormat(const char* expr1,
...
@@ -1397,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
...
@@ -3335,7 +3334,7 @@ void TestEventRepeater::Append(TestEventListener *listener) {
...
@@ -3335,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
)
{
...
@@ -3500,7 +3499,7 @@ void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
...
@@ -3500,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:
//
//
...
@@ -3529,7 +3528,7 @@ void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
...
@@ -3529,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
)
{
...
@@ -3680,7 +3679,7 @@ void XmlUnitTestResultPrinter::OutputXmlAttribute(
...
@@ -3680,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
)
{
...
@@ -3907,7 +3906,7 @@ void JsonUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
...
@@ -3907,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:
//
//
...
@@ -4722,7 +4721,7 @@ int UnitTest::Run() {
...
@@ -4722,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
(
...
@@ -5616,7 +5615,7 @@ static bool HasGoogleTestFlagPrefix(const char* str) {
...
@@ -5616,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.
...
...
googletest/src/gtest_main.cc
View file @
3c4f437c
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#include <stdio.h>
#include <stdio.h>
#include "gtest/gtest.h"
#include "gtest/gtest.h"
...
...
googletest/test/googletest-break-on-failure-unittest.py
View file @
3c4f437c
...
@@ -38,8 +38,6 @@ by invoking googletest-break-on-failure-unittest_ (a program written with
...
@@ -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
...
...
googletest/test/googletest-break-on-failure-unittest_.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Unit test for Google Test's break-on-failure mode.
// Unit test for Google Test's break-on-failure mode.
//
//
...
...
googletest/test/googletest-catch-exceptions-test.py
View file @
3c4f437c
...
@@ -35,8 +35,6 @@ googletest-catch-exceptions-ex-test_ (programs written with
...
@@ -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.
...
...
googletest/test/googletest-catch-exceptions-test_.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
//
//
// Tests for Google Test itself. Tests in this file throw C++ or SEH
// Tests for Google Test itself. Tests in this file throw C++ or SEH
// exceptions, and the output is verified by
// exceptions, and the output is verified by
...
...
googletest/test/googletest-color-test.py
View file @
3c4f437c
...
@@ -31,8 +31,6 @@
...
@@ -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
...
...
googletest/test/googletest-color-test_.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// A helper program for testing how Google Test determines whether to use
// A helper program for testing how Google Test determines whether to use
// colors in the output. It prints "YES" and returns 1 if Google Test
// colors in the output. It prints "YES" and returns 1 if Google Test
...
...
googletest/test/googletest-death-test-test.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
//
//
// Tests for death tests.
// Tests for death tests.
...
@@ -1280,7 +1279,7 @@ TEST(ParseNaturalNumberTest, WorksForShorterIntegers) {
...
@@ -1280,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
));
...
...
googletest/test/googletest-death-test_ex_test.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
//
//
// Tests that verify interaction of exceptions and death tests.
// Tests that verify interaction of exceptions and death tests.
...
...
googletest/test/googletest-env-var-test.py
View file @
3c4f437c
...
@@ -31,8 +31,6 @@
...
@@ -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
...
...
googletest/test/googletest-env-var-test_.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// A helper program for testing that Google Test parses the environment
// A helper program for testing that Google Test parses the environment
// variables correctly.
// variables correctly.
...
...
googletest/test/googletest-filepath-test.cc
View file @
3c4f437c
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
//
// Google Test filepath utilities
// Google Test filepath utilities
//
//
// This file tests classes and functions used internally by
// This file tests classes and functions used internally by
...
@@ -51,7 +50,7 @@ namespace internal {
...
@@ -51,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.
...
...
googletest/test/googletest-filter-unittest.py
View file @
3c4f437c
...
@@ -40,8 +40,6 @@ Note that test sharding may also influence which tests are filtered. Therefore,
...
@@ -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
...
...
googletest/test/googletest-filter-unittest_.cc
View file @
3c4f437c
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Unit test for Google Test test filters.
// Unit test for Google Test test filters.
//
//
...
...
Prev
1
2
3
4
5
6
7
8
9
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