aboutsummaryrefslogtreecommitdiffstats
path: root/vespamalloc/src/tests/test1/new_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-06-28 11:21:20 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-06-28 11:21:20 +0000
commit78153ab3b636f1b0642590cfd296ed8e19415c88 (patch)
treea2f69801527086e04b3d4b4eada7f7c64671853c /vespamalloc/src/tests/test1/new_test.cpp
parent21f1ed5bceb790564918ccb010d60fd85a87497c (diff)
Expose a way to access vespamalloc internals.
Diffstat (limited to 'vespamalloc/src/tests/test1/new_test.cpp')
-rw-r--r--vespamalloc/src/tests/test1/new_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/vespamalloc/src/tests/test1/new_test.cpp b/vespamalloc/src/tests/test1/new_test.cpp
index 2400e41a1d9..a8392363f6f 100644
--- a/vespamalloc/src/tests/test1/new_test.cpp
+++ b/vespamalloc/src/tests/test1/new_test.cpp
@@ -12,7 +12,7 @@ void cmp(const void *base, size_t offset, const void *p) {
}
template <typename S>
-void veryfy_aligned(S * p) {
+void verify_aligned(S * p) {
EXPECT_TRUE((uintptr_t(p) % alignof(S)) == 0);
memset(p, 0, sizeof(S));
}
@@ -26,7 +26,7 @@ TEST("verify new with normal alignment") {
static_assert(sizeof(S) == 24);
static_assert(alignof(S) == 8);
auto s = std::make_unique<S>();
- veryfy_aligned(s.get());
+ verify_aligned(s.get());
cmp(s.get(), &s->a);
cmp(s.get(), 8, &s->b);
cmp(s.get(), 16, &s->c);
@@ -42,7 +42,7 @@ TEST("verify new with alignment = 16") {
static_assert(sizeof(S) == 32);
static_assert(alignof(S) == 16);
auto s = std::make_unique<S>();
- veryfy_aligned(s.get());
+ verify_aligned(s.get());
cmp(s.get(), &s->a);
cmp(s.get(), 16, &s->b);
cmp(s.get(), 24, &s->c);
@@ -58,7 +58,7 @@ TEST("verify new with alignment = 32") {
static_assert(sizeof(S) == 64);
static_assert(alignof(S) == 32);
auto s = std::make_unique<S>();
- veryfy_aligned(s.get());
+ verify_aligned(s.get());
cmp(s.get(), &s->a);
cmp(s.get(), 32, &s->b);
cmp(s.get(), 40, &s->c);
@@ -74,7 +74,7 @@ TEST("verify new with alignment = 64") {
static_assert(sizeof(S) == 128);
static_assert(alignof(S) == 64);
auto s = std::make_unique<S>();
- veryfy_aligned(s.get());
+ verify_aligned(s.get());
cmp(s.get(), &s->a);
cmp(s.get(), 64, &s->b);
cmp(s.get(), 72, &s->c);
@@ -88,7 +88,7 @@ TEST("verify new with alignment = 64 with single element") {
static_assert(sizeof(S) == 64);
static_assert(alignof(S) == 64);
auto s = std::make_unique<S>();
- veryfy_aligned(s.get());
+ verify_aligned(s.get());
cmp(s.get(), &s->a);
LOG(info, "&s=%p", s.get());
}
@@ -100,7 +100,7 @@ TEST("verify new with alignment = 64 with single element") {
static_assert(sizeof(S) == 64);
static_assert(alignof(S) == 64);
auto s = std::make_unique<S>();
- veryfy_aligned(s.get());
+ verify_aligned(s.get());
cmp(s.get(), &s->a);
LOG(info, "&s=%p", s.get());
}