From e7f3241af356beb42bf252b27cd97d241e575f3c Mon Sep 17 00:00:00 2001 From: Jingchen Date: Wed, 1 Apr 2026 21:05:57 +0100 Subject: [PATCH] Update src/test/basics/TaggedCache_test.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/test/basics/TaggedCache_test.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/basics/TaggedCache_test.cpp b/src/test/basics/TaggedCache_test.cpp index d100327757..eebe21b8de 100644 --- a/src/test/basics/TaggedCache_test.cpp +++ b/src/test/basics/TaggedCache_test.cpp @@ -152,9 +152,14 @@ public: BEAST_EXPECT(c.canonicalize_replace_cache(5, p2)); BEAST_EXPECT(c.getCacheSize() == 1); BEAST_EXPECT(c.size() == 1); - // Make sure we get the original object + // Make sure we get the new object cached, not the original BEAST_EXPECT(p1.get() != p2.get()); BEAST_EXPECT(*p2 == "five_2"); + + auto const p3 = c.fetch(5); + BEAST_EXPECT(p3 != nullptr); + BEAST_EXPECT(p3.get() == p2.get()); + BEAST_EXPECT(p3.get() != p1.get()); } ++clock;