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
cf3f92ef
Commit
cf3f92ef
authored
Aug 16, 2011
by
vladlosev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes a user reported test break (modifying a dict while iterating).
parent
c2922d4e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
13 deletions
+20
-13
gtest-port.h
include/gtest/internal/gtest-port.h
+7
-0
gtest-type-util.h
include/gtest/internal/gtest-type-util.h
+6
-6
gtest-type-util.h.pump
include/gtest/internal/gtest-type-util.h.pump
+6
-6
gtest_test_utils.py
test/gtest_test_utils.py
+1
-1
No files found.
include/gtest/internal/gtest-port.h
View file @
cf3f92ef
...
@@ -678,6 +678,13 @@
...
@@ -678,6 +678,13 @@
# define GTEST_NO_INLINE_
# define GTEST_NO_INLINE_
#endif
#endif
// _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.
#if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
# define GTEST_HAS_CXXABI_H_ 1
#else
# define GTEST_HAS_CXXABI_H_ 0
#endif
namespace
testing
{
namespace
testing
{
class
Message
;
class
Message
;
...
...
include/gtest/internal/gtest-type-util.h
View file @
cf3f92ef
...
@@ -49,11 +49,11 @@
...
@@ -49,11 +49,11 @@
// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
// libstdc++ (which is where cxxabi.h comes from).
// libstdc++ (which is where cxxabi.h comes from).
# if
def __GLIBCXX_
_
# if
GTEST_HAS_CXXABI_H
_
# include <cxxabi.h>
# include <cxxabi.h>
# elif defined(__HP_aCC)
# elif defined(__HP_aCC)
# include <acxx_demangle.h>
# include <acxx_demangle.h>
# endif //
__GLIBCXX_
_
# endif //
GTEST_HASH_CXXABI_H
_
namespace
testing
{
namespace
testing
{
namespace
internal
{
namespace
internal
{
...
@@ -66,20 +66,20 @@ String GetTypeName() {
...
@@ -66,20 +66,20 @@ String GetTypeName() {
# if GTEST_HAS_RTTI
# if GTEST_HAS_RTTI
const
char
*
const
name
=
typeid
(
T
).
name
();
const
char
*
const
name
=
typeid
(
T
).
name
();
# if
defined(__GLIBCXX__)
|| defined(__HP_aCC)
# if
GTEST_HAS_CXXABI_H_
|| defined(__HP_aCC)
int
status
=
0
;
int
status
=
0
;
// gcc's implementation of typeid(T).name() mangles the type name,
// gcc's implementation of typeid(T).name() mangles the type name,
// so we have to demangle it.
// so we have to demangle it.
# if
def __GLIBCXX_
_
# if
GTEST_HAS_CXXABI_H
_
using
abi
::
__cxa_demangle
;
using
abi
::
__cxa_demangle
;
# endif //
__GLIBCXX_
_
# endif //
GTEST_HAS_CXXABI_H
_
char
*
const
readable_name
=
__cxa_demangle
(
name
,
0
,
0
,
&
status
);
char
*
const
readable_name
=
__cxa_demangle
(
name
,
0
,
0
,
&
status
);
const
String
name_str
(
status
==
0
?
readable_name
:
name
);
const
String
name_str
(
status
==
0
?
readable_name
:
name
);
free
(
readable_name
);
free
(
readable_name
);
return
name_str
;
return
name_str
;
# else
# else
return
name
;
return
name
;
# endif //
__GLIBCXX_
_ || __HP_aCC
# endif //
GTEST_HAS_CXXABI_H
_ || __HP_aCC
# else
# else
...
...
include/gtest/internal/gtest-type-util.h.pump
View file @
cf3f92ef
...
@@ -47,11 +47,11 @@ $var n = 50 $$ Maximum length of type lists we want to support.
...
@@ -47,11 +47,11 @@ $var n = 50 $$ Maximum length of type lists we want to support.
// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
// libstdc++ (which is where cxxabi.h comes from).
// libstdc++ (which is where cxxabi.h comes from).
# if
def __GLIBCXX_
_
# if
GTEST_HAS_CXXABI_H
_
# include <cxxabi.h>
# include <cxxabi.h>
# elif defined(__HP_aCC)
# elif defined(__HP_aCC)
# include <acxx_demangle.h>
# include <acxx_demangle.h>
# endif //
__GLIBCXX_
_
# endif //
GTEST_HASH_CXXABI_H
_
namespace
testing
{
namespace
testing
{
namespace
internal
{
namespace
internal
{
...
@@ -64,20 +64,20 @@ String GetTypeName() {
...
@@ -64,20 +64,20 @@ String GetTypeName() {
# if GTEST_HAS_RTTI
# if GTEST_HAS_RTTI
const
char
*
const
name
=
typeid
(
T
).
name
();
const
char
*
const
name
=
typeid
(
T
).
name
();
# if
defined(__GLIBCXX__)
|| defined(__HP_aCC)
# if
GTEST_HAS_CXXABI_H_
|| defined(__HP_aCC)
int
status
=
0
;
int
status
=
0
;
// gcc's implementation of typeid(T).name() mangles the type name,
// gcc's implementation of typeid(T).name() mangles the type name,
// so we have to demangle it.
// so we have to demangle it.
# if
def __GLIBCXX_
_
# if
GTEST_HAS_CXXABI_H
_
using
abi
::
__cxa_demangle
;
using
abi
::
__cxa_demangle
;
# endif //
__GLIBCXX_
_
# endif //
GTEST_HAS_CXXABI_H
_
char
*
const
readable_name
=
__cxa_demangle
(
name
,
0
,
0
,
&
status
);
char
*
const
readable_name
=
__cxa_demangle
(
name
,
0
,
0
,
&
status
);
const
String
name_str
(
status
==
0
?
readable_name
:
name
);
const
String
name_str
(
status
==
0
?
readable_name
:
name
);
free
(
readable_name
);
free
(
readable_name
);
return
name_str
;
return
name_str
;
# else
# else
return
name
;
return
name
;
# endif //
__GLIBCXX_
_ || __HP_aCC
# endif //
GTEST_HAS_CXXABI_H
_ || __HP_aCC
# else
# else
...
...
test/gtest_test_utils.py
View file @
cf3f92ef
...
@@ -241,7 +241,7 @@ class Subprocess:
...
@@ -241,7 +241,7 @@ class Subprocess:
# Changes made by os.environ.clear are not inheritable by child
# Changes made by os.environ.clear are not inheritable by child
# processes until Python 2.6. To produce inheritable changes we have
# processes until Python 2.6. To produce inheritable changes we have
# to delete environment items with the del statement.
# to delete environment items with the del statement.
for
key
in
dest
:
for
key
in
dest
.
keys
()
:
del
dest
[
key
]
del
dest
[
key
]
dest
.
update
(
src
)
dest
.
update
(
src
)
...
...
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