From e837171f7c6870ed92e3871521deb1cb33b3bad5 Mon Sep 17 00:00:00 2001 From: JCW Date: Mon, 4 Aug 2025 13:50:54 +0100 Subject: [PATCH] Fix formatting Signed-off-by: JCW --- src/test/basics/TaggedCache_test.cpp | 41 +++++++++++++++++++--------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/src/test/basics/TaggedCache_test.cpp b/src/test/basics/TaggedCache_test.cpp index 7decb081fe..b25e1123c2 100644 --- a/src/test/basics/TaggedCache_test.cpp +++ b/src/test/basics/TaggedCache_test.cpp @@ -20,11 +20,12 @@ #include #include -#include #include #include #include +#include + namespace ripple { /* @@ -194,22 +195,28 @@ public: MyRefCountObject() = default; explicit MyRefCountObject(std::string data) - : _data(std::move(data)) {} - explicit MyRefCountObject(char const* data) - : _data(data) {} + : _data(std::move(data)) + { + } + explicit MyRefCountObject(char const* data) : _data(data) + { + } - MyRefCountObject& operator=(MyRefCountObject const& other) + MyRefCountObject& + operator=(MyRefCountObject const& other) { _data = other._data; return *this; } - bool operator==(MyRefCountObject const& other) const + bool + operator==(MyRefCountObject const& other) const { return _data == other._data; } - bool operator==(std::string const& other) const + bool + operator==(std::string const& other) const { return _data == other; } @@ -220,18 +227,21 @@ public: MyRefCountObject, /*IsKeyCache*/ false, intr_ptr::SharedWeakUnionPtr, - intr_ptr::SharedPtr - >; + intr_ptr::SharedPtr>; IntrPtrCache intrPtrCache("IntrPtrTest", 1, 1s, clock, journal); - intrPtrCache.canonicalize_replace_cache(1, intr_ptr::make_shared("one")); + intrPtrCache.canonicalize_replace_cache( + 1, intr_ptr::make_shared("one")); BEAST_EXPECT(intrPtrCache.getCacheSize() == 1); BEAST_EXPECT(intrPtrCache.getTrackSize() == 1); { { - intrPtrCache.canonicalize_replace_cache(1, intr_ptr::make_shared("one_replaced")); + intrPtrCache.canonicalize_replace_cache( + 1, + intr_ptr::make_shared( + "one_replaced")); auto p = intrPtrCache.fetch(1); BEAST_EXPECT(*p == "one_replaced"); @@ -242,7 +252,10 @@ public: BEAST_EXPECT(intrPtrCache.getCacheSize() == 0); BEAST_EXPECT(intrPtrCache.getTrackSize() == 1); - intrPtrCache.canonicalize_replace_cache(1, intr_ptr::make_shared("one_replaced_2")); + intrPtrCache.canonicalize_replace_cache( + 1, + intr_ptr::make_shared( + "one_replaced_2")); auto p2 = intrPtrCache.fetch(1); BEAST_EXPECT(*p2 == "one_replaced_2"); @@ -250,7 +263,9 @@ public: intrPtrCache.del(1, true); } - intrPtrCache.canonicalize_replace_cache(1, intr_ptr::make_shared("one_replaced_3")); + intrPtrCache.canonicalize_replace_cache( + 1, + intr_ptr::make_shared("one_replaced_3")); auto p3 = intrPtrCache.fetch(1); BEAST_EXPECT(*p3 == "one_replaced_3"); }