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
39bf784f
Commit
39bf784f
authored
Dec 16, 2009
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes uses of GTEST_HAS_STD_STRING.
parent
5a3c1691
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1 addition
and
15 deletions
+1
-15
gmock-actions.h
include/gmock/gmock-actions.h
+0
-2
gmock-printers.h
include/gmock/gmock-printers.h
+0
-2
gmock-port.h
include/gmock/internal/gmock-port.h
+1
-3
gmock-printers.cc
src/gmock-printers.cc
+0
-2
gmock-actions_test.cc
test/gmock-actions_test.cc
+0
-4
gmock-printers_test.cc
test/gmock-printers_test.cc
+0
-2
No files found.
include/gmock/gmock-actions.h
View file @
39bf784f
...
@@ -117,9 +117,7 @@ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT
...
@@ -117,9 +117,7 @@ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT
#if GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_GLOBAL_STRING
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
::
string
,
""
);
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
::
string
,
""
);
#endif // GTEST_HAS_GLOBAL_STRING
#endif // GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_STD_STRING
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
::
std
::
string
,
""
);
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
::
std
::
string
,
""
);
#endif // GTEST_HAS_STD_STRING
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
bool
,
false
);
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
bool
,
false
);
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
unsigned
char
,
'\0'
);
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
unsigned
char
,
'\0'
);
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
signed
char
,
'\0'
);
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
(
signed
char
,
'\0'
);
...
...
include/gmock/gmock-printers.h
View file @
39bf784f
...
@@ -409,12 +409,10 @@ inline void PrintTo(const ::string& s, ::std::ostream* os) {
...
@@ -409,12 +409,10 @@ inline void PrintTo(const ::string& s, ::std::ostream* os) {
}
}
#endif // GTEST_HAS_GLOBAL_STRING
#endif // GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_STD_STRING
void
PrintStringTo
(
const
::
std
::
string
&
s
,
::
std
::
ostream
*
os
);
void
PrintStringTo
(
const
::
std
::
string
&
s
,
::
std
::
ostream
*
os
);
inline
void
PrintTo
(
const
::
std
::
string
&
s
,
::
std
::
ostream
*
os
)
{
inline
void
PrintTo
(
const
::
std
::
string
&
s
,
::
std
::
ostream
*
os
)
{
PrintStringTo
(
s
,
os
);
PrintStringTo
(
s
,
os
);
}
}
#endif // GTEST_HAS_STD_STRING
// Overloads for ::wstring and ::std::wstring.
// Overloads for ::wstring and ::std::wstring.
#if GTEST_HAS_GLOBAL_WSTRING
#if GTEST_HAS_GLOBAL_WSTRING
...
...
include/gmock/internal/gmock-port.h
View file @
39bf784f
...
@@ -198,10 +198,8 @@ struct CompileAssert {
...
@@ -198,10 +198,8 @@ struct CompileAssert {
#if GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_GLOBAL_STRING
typedef
::
string
string
;
typedef
::
string
string
;
#elif GTEST_HAS_STD_STRING
typedef
::
std
::
string
string
;
#else
#else
#error "Google Mock requires ::std::string to compile."
typedef
::
std
::
string
string
;
#endif // GTEST_HAS_GLOBAL_STRING
#endif // GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_GLOBAL_WSTRING
#if GTEST_HAS_GLOBAL_WSTRING
...
...
src/gmock-printers.cc
View file @
39bf784f
...
@@ -296,11 +296,9 @@ void PrintStringTo(const ::string& s, ostream* os) {
...
@@ -296,11 +296,9 @@ void PrintStringTo(const ::string& s, ostream* os) {
}
}
#endif // GTEST_HAS_GLOBAL_STRING
#endif // GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_STD_STRING
void
PrintStringTo
(
const
::
std
::
string
&
s
,
ostream
*
os
)
{
void
PrintStringTo
(
const
::
std
::
string
&
s
,
ostream
*
os
)
{
PrintCharsAsStringTo
(
s
.
data
(),
s
.
size
(),
os
);
PrintCharsAsStringTo
(
s
.
data
(),
s
.
size
(),
os
);
}
}
#endif // GTEST_HAS_STD_STRING
// Prints a ::wstring object.
// Prints a ::wstring object.
#if GTEST_HAS_GLOBAL_WSTRING
#if GTEST_HAS_GLOBAL_WSTRING
...
...
test/gmock-actions_test.cc
View file @
39bf784f
...
@@ -165,9 +165,7 @@ TEST(BuiltInDefaultValueTest, IsEmptyStringForString) {
...
@@ -165,9 +165,7 @@ TEST(BuiltInDefaultValueTest, IsEmptyStringForString) {
EXPECT_EQ
(
""
,
BuiltInDefaultValue
<
::
string
>::
Get
());
EXPECT_EQ
(
""
,
BuiltInDefaultValue
<
::
string
>::
Get
());
#endif // GTEST_HAS_GLOBAL_STRING
#endif // GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_STD_STRING
EXPECT_EQ
(
""
,
BuiltInDefaultValue
<
::
std
::
string
>::
Get
());
EXPECT_EQ
(
""
,
BuiltInDefaultValue
<
::
std
::
string
>::
Get
());
#endif // GTEST_HAS_STD_STRING
}
}
// Tests that BuiltInDefaultValue<T>::Exists() returns true when T is a
// Tests that BuiltInDefaultValue<T>::Exists() returns true when T is a
...
@@ -177,9 +175,7 @@ TEST(BuiltInDefaultValueTest, ExistsForString) {
...
@@ -177,9 +175,7 @@ TEST(BuiltInDefaultValueTest, ExistsForString) {
EXPECT_TRUE
(
BuiltInDefaultValue
<
::
string
>::
Exists
());
EXPECT_TRUE
(
BuiltInDefaultValue
<
::
string
>::
Exists
());
#endif // GTEST_HAS_GLOBAL_STRING
#endif // GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_STD_STRING
EXPECT_TRUE
(
BuiltInDefaultValue
<
::
std
::
string
>::
Exists
());
EXPECT_TRUE
(
BuiltInDefaultValue
<
::
std
::
string
>::
Exists
());
#endif // GTEST_HAS_STD_STRING
}
}
// Tests that BuiltInDefaultValue<const T>::Get() returns the same
// Tests that BuiltInDefaultValue<const T>::Get() returns the same
...
...
test/gmock-printers_test.cc
View file @
39bf784f
...
@@ -560,7 +560,6 @@ TEST(PrintStringTest, StringInGlobalNamespace) {
...
@@ -560,7 +560,6 @@ TEST(PrintStringTest, StringInGlobalNamespace) {
}
}
#endif // GTEST_HAS_GLOBAL_STRING
#endif // GTEST_HAS_GLOBAL_STRING
#if GTEST_HAS_STD_STRING
// ::std::string.
// ::std::string.
TEST
(
PrintStringTest
,
StringInStdNamespace
)
{
TEST
(
PrintStringTest
,
StringInStdNamespace
)
{
const
char
s
[]
=
"'
\"
\?
\\\a\b\f\n\0\r\t\v\x7F\xFF
a"
;
const
char
s
[]
=
"'
\"
\?
\\\a\b\f\n\0\r\t\v\x7F\xFF
a"
;
...
@@ -568,7 +567,6 @@ TEST(PrintStringTest, StringInStdNamespace) {
...
@@ -568,7 +567,6 @@ TEST(PrintStringTest, StringInStdNamespace) {
EXPECT_EQ
(
"
\"
'
\\\"\\
?
\\\\\\
a
\\
b
\\
f
\\
n
\\
0
\\
r
\\
t
\\
v
\\
x7F
\\
xFF a
\\
0
\"
"
,
EXPECT_EQ
(
"
\"
'
\\\"\\
?
\\\\\\
a
\\
b
\\
f
\\
n
\\
0
\\
r
\\
t
\\
v
\\
x7F
\\
xFF a
\\
0
\"
"
,
Print
(
str
));
Print
(
str
));
}
}
#endif // GTEST_HAS_STD_STRING
// Tests printing ::wstring and ::std::wstring.
// Tests printing ::wstring and ::std::wstring.
...
...
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