aboutsummaryrefslogtreecommitdiff
path: root/pw_allocator/allocator_metric_proxy_test.cc
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-23 00:09:38 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-11-23 00:09:38 +0000
commitaff67b6bbc28eba4d1f4a4a12e116e63ab4813ea (patch)
treeb7892405559e1714c330ffb8ac9de9104296f4e3 /pw_allocator/allocator_metric_proxy_test.cc
parent13960e09d00c4e8612da0a9084e0e051603f072b (diff)
parentf054515492af5132f685cb23fe11891ee77104c9 (diff)
downloadpigweed-aff67b6bbc28eba4d1f4a4a12e116e63ab4813ea.tar.gz
Change-Id: I018123259cd231d0e74933e492391999e36650e8
Diffstat (limited to 'pw_allocator/allocator_metric_proxy_test.cc')
-rw-r--r--pw_allocator/allocator_metric_proxy_test.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/pw_allocator/allocator_metric_proxy_test.cc b/pw_allocator/allocator_metric_proxy_test.cc
index e426349a9..cfc94b2f0 100644
--- a/pw_allocator/allocator_metric_proxy_test.cc
+++ b/pw_allocator/allocator_metric_proxy_test.cc
@@ -15,27 +15,23 @@
#include "pw_allocator/allocator_metric_proxy.h"
#include "gtest/gtest.h"
-#include "pw_allocator_private/allocator_testing.h"
+#include "pw_allocator/allocator_testing.h"
namespace pw::allocator {
namespace {
// Test fixtures.
-struct AllocatorMetricProxyTest : ::testing::Test {
- private:
- std::array<std::byte, 256> buffer = {};
- test::FakeAllocator wrapped;
+class AllocatorMetricProxyTest : public ::testing::Test {
+ protected:
+ AllocatorMetricProxyTest() : allocator(0) {}
- public:
- AllocatorMetricProxy allocator;
+ void SetUp() override { allocator.Initialize(*wrapped); }
- AllocatorMetricProxyTest() : allocator(0) {}
+ AllocatorMetricProxy allocator;
- void SetUp() override {
- EXPECT_TRUE(wrapped.Initialize(buffer).ok());
- allocator.Initialize(wrapped);
- }
+ private:
+ test::AllocatorForTestWithBuffer<256> wrapped;
};
// Unit tests.