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
Sebastian Schrader
Kea
Commits
3456e30b
Commit
3456e30b
authored
May 03, 2013
by
Mukund Sivaraman
Browse files
[2850] Don't declare a global static std::string object to avoid init fiasco
parent
4325f3df
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc
View file @
3456e30b
...
...
@@ -28,7 +28,7 @@ using boost::scoped_ptr;
namespace
{
const
std
::
string
mapped_file
=
TEST_DATA_BUILDDIR
"/test.mapped"
;
const
char
*
mapped_file
=
TEST_DATA_BUILDDIR
"/test.mapped"
;
class
ZoneTableSegmentMappedTest
:
public
::
testing
::
Test
{
protected:
...
...
@@ -36,7 +36,8 @@ protected:
ztable_segment_
(
ZoneTableSegment
::
create
(
RRClass
::
IN
(),
"mapped"
)),
config_params_
(
Element
::
fromJSON
(
"{
\"
mapped-file
\"
:
\"
"
+
mapped_file
+
"
\"
}"
))
Element
::
fromJSON
(
"{
\"
mapped-file
\"
:
\"
"
+
std
::
string
(
mapped_file
)
+
"
\"
}"
))
{
EXPECT_NE
(
static_cast
<
void
*>
(
NULL
),
ztable_segment_
);
// Verify that a ZoneTableSegmentMapped is created.
...
...
@@ -47,7 +48,7 @@ protected:
~
ZoneTableSegmentMappedTest
()
{
ZoneTableSegment
::
destroy
(
ztable_segment_
);
boost
::
interprocess
::
file_mapping
::
remove
(
mapped_file
.
c_str
()
);
boost
::
interprocess
::
file_mapping
::
remove
(
mapped_file
);
}
ZoneTableSegment
*
ztable_segment_
;
...
...
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