Release the test value with = nullptr instead of reset()
clang-tidy (readability-ambiguous-smartptr-reset-call) rejects j.reset() because the pointee inherits a reset() from counting_base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N5NasAgbDGG28MqXjQvLqp Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 file changed
+1
-1
@@ -544,7 +544,7 @@ TEST_CASE("destroying a value does not construct the custom base class")
|
||||
const auto check_destroy = [](std::unique_ptr<json_with_counting_base> j, std::size_t values)
|
||||
{
|
||||
counting_base::reset();
|
||||
j.reset();
|
||||
j = nullptr;
|
||||
CHECK(counting_base::constructions == 0);
|
||||
CHECK(counting_base::destructions == values);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user