Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
7d7beaa1
Commit
7d7beaa1
authored
Jul 19, 2015
by
kosak
Browse files
Condition some code on !GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
parent
4d69b160
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
test/gtest-port_test.cc
test/gtest-port_test.cc
+9
-0
No files found.
test/gtest-port_test.cc
View file @
7d7beaa1
...
...
@@ -1149,6 +1149,13 @@ TEST(ThreadLocalTest, ParameterizedConstructorSetsDefault) {
EXPECT_STREQ
(
"foo"
,
result
.
c_str
());
}
# if !GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
// Tests in this section depend on that Google Test's own ThreadLocal
// implementation stores a copy of the default value shared by all
// threads. We don't want to test this for an external implementation received
// through GTEST_HAS_MUTEX_AND_THREAD_LOCAL_.
// Keeps track of whether of destructors being called on instances of
// DestructorTracker. On Windows, waits for the destructor call reports.
class
DestructorCall
{
...
...
@@ -1289,6 +1296,8 @@ TEST(ThreadLocalTest, DestroysManagedObjectAtThreadExit) {
DestructorCall
::
ResetList
();
}
# endif // !GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
TEST
(
ThreadLocalTest
,
ThreadLocalMutationsAffectOnlyCurrentThread
)
{
ThreadLocal
<
std
::
string
>
thread_local_string
;
thread_local_string
.
set
(
"Foo"
);
...
...
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