Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
5395345c
Commit
5395345c
authored
Oct 10, 2019
by
Gennadiy Civil
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2497 from thejcannon:handle_null_filename
PiperOrigin-RevId: 273585229
parents
cb1d5db1
2ed2211d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
gmock-spec-builders.cc
googlemock/src/gmock-spec-builders.cc
+5
-1
gtest-test-part.cc
googletest/src/gtest-test-part.cc
+5
-1
No files found.
googlemock/src/gmock-spec-builders.cc
View file @
5395345c
...
@@ -36,14 +36,17 @@
...
@@ -36,14 +36,17 @@
#include "gmock/gmock-spec-builders.h"
#include "gmock/gmock-spec-builders.h"
#include <stdlib.h>
#include <stdlib.h>
#include <iostream> // NOLINT
#include <iostream> // NOLINT
#include <map>
#include <map>
#include <memory>
#include <memory>
#include <set>
#include <set>
#include <string>
#include <string>
#include <vector>
#include <vector>
#include "gmock/gmock.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#include "gtest/internal/gtest-port.h"
#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC
#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC
# include <unistd.h> // NOLINT
# include <unistd.h> // NOLINT
...
@@ -70,7 +73,8 @@ GTEST_API_ void LogWithLocation(testing::internal::LogSeverity severity,
...
@@ -70,7 +73,8 @@ GTEST_API_ void LogWithLocation(testing::internal::LogSeverity severity,
const
char
*
file
,
int
line
,
const
char
*
file
,
int
line
,
const
std
::
string
&
message
)
{
const
std
::
string
&
message
)
{
::
std
::
ostringstream
s
;
::
std
::
ostringstream
s
;
s
<<
file
<<
":"
<<
line
<<
": "
<<
message
<<
::
std
::
endl
;
s
<<
internal
::
FormatFileLocation
(
file
,
line
)
<<
" "
<<
message
<<
::
std
::
endl
;
Log
(
severity
,
s
.
str
(),
0
);
Log
(
severity
,
s
.
str
(),
0
);
}
}
...
...
googletest/src/gtest-test-part.cc
View file @
5395345c
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
// The Google C++ Testing and Mocking Framework (Google Test)
// The Google C++ Testing and Mocking Framework (Google Test)
#include "gtest/gtest-test-part.h"
#include "gtest/gtest-test-part.h"
#include "gtest/internal/gtest-port.h"
#include "src/gtest-internal-inl.h"
#include "src/gtest-internal-inl.h"
namespace
testing
{
namespace
testing
{
...
@@ -46,7 +48,9 @@ std::string TestPartResult::ExtractSummary(const char* message) {
...
@@ -46,7 +48,9 @@ std::string TestPartResult::ExtractSummary(const char* message) {
// Prints a TestPartResult object.
// Prints a TestPartResult object.
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
TestPartResult
&
result
)
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
TestPartResult
&
result
)
{
return
os
<<
result
.
file_name
()
<<
":"
<<
result
.
line_number
()
<<
": "
return
os
<<
internal
::
FormatFileLocation
(
result
.
file_name
(),
result
.
line_number
())
<<
" "
<<
(
result
.
type
()
==
TestPartResult
::
kSuccess
<<
(
result
.
type
()
==
TestPartResult
::
kSuccess
?
"Success"
?
"Success"
:
result
.
type
()
==
TestPartResult
::
kSkip
:
result
.
type
()
==
TestPartResult
::
kSkip
...
...
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