BIND 10 trac2850_2, updated. 56d109e8a0c5d46ac542870723ba324aa2425b88 [2850] Fix address name generation
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed May 8 11:00:56 UTC 2013
The branch, trac2850_2 has been updated
via 56d109e8a0c5d46ac542870723ba324aa2425b88 (commit)
from 9d90db228e26173b0781d090ea2b0e078c7969f6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 56d109e8a0c5d46ac542870723ba324aa2425b88
Author: Mukund Sivaraman <muks at isc.org>
Date: Wed May 8 16:30:17 2013 +0530
[2850] Fix address name generation
-----------------------------------------------------------------------
Summary of changes:
.../memory/zone_table_segment_mapped_unittest.cc | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc b/src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc
index 153931b..1c68d61 100644
--- a/src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc
+++ b/src/lib/datasrc/tests/memory/zone_table_segment_mapped_unittest.cc
@@ -18,6 +18,7 @@
#include <util/unittests/check_valgrind.h>
#include <gtest/gtest.h>
+#include <boost/format.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/interprocess/file_mapping.hpp>
@@ -33,7 +34,7 @@ using boost::scoped_ptr;
namespace {
-const char* const mapped_file = TEST_DATA_BUILDDIR "/test.mapped";
+const char* const mapped_file = TEST_DATA_BUILDDIR "/test.mapped";
const char* const mapped_file2 = TEST_DATA_BUILDDIR "/test2.mapped";
class ZoneTableSegmentMappedTest : public ::testing::Test {
@@ -86,8 +87,7 @@ createData(MemorySegment& segment) {
// to keep the size of test data reasonably small.
UniformRandomIntegerGenerator gen(0, INT_MAX, getpid());
for (int i = 0; i < 256; ++i) {
- string name("name");
- name += i;
+ const string name(boost::str(boost::format("name%d") % i));
const int value = gen();
void* ptr = segment.allocate(sizeof(int));
ASSERT_TRUE(ptr);
@@ -101,8 +101,7 @@ bool
verifyData(const MemorySegment& segment) {
UniformRandomIntegerGenerator gen(0, INT_MAX, getpid());
for (int i = 0; i < 256; ++i) {
- string name("name");
- name += i;
+ const string name(boost::str(boost::format("name%d") % i));
const int value = gen();
const MemorySegment::NamedAddressResult result =
segment.getNamedAddress(name.c_str());
More information about the bind10-changes
mailing list