summaryrefslogtreecommitdiff
path: root/Tests/AK/CMakeLists.txt
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-12-15 20:51:55 -0700
committerTim Flynn <trflynn89@pm.me>2022-12-17 16:00:08 -0500
commitf2336d0144fbbf6d72bd1eeaa34667dc4eb76760 (patch)
treea1f1c53b9257a11baf2f2e382ddf2f6bd9b2c27e /Tests/AK/CMakeLists.txt
parent53133b4359caf5a8cc5f30d1313759ea4a017870 (diff)
downloadserenity-f2336d0144fbbf6d72bd1eeaa34667dc4eb76760.zip
AK+Everywhere: Move custom deleter capability to OwnPtr
`OwnPtrWithCustomDeleter` was a decorator which provided the ability to add a custom deleter to `OwnPtr` by wrapping and taking the deleter as a run-time argument to the constructor. This solution means that no additional space is needed for the `OwnPtr` because it doesn't need to store a pointer to the deleter, but comes at the cost of having an extra type that stores a pointer for every instance. This logic is moved directly into `OwnPtr` by adding a template argument that is defaulted to the default deleter for the type. This means that the type itself stores the pointer to the deleter instead of every instance and adds some type safety by encoding the deleter in the type itself instead of taking a run-time argument.
Diffstat (limited to 'Tests/AK/CMakeLists.txt')
-rw-r--r--Tests/AK/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/AK/CMakeLists.txt b/Tests/AK/CMakeLists.txt
index 7bf3e85110..27751cbaa4 100644
--- a/Tests/AK/CMakeLists.txt
+++ b/Tests/AK/CMakeLists.txt
@@ -52,6 +52,7 @@ set(AK_TEST_SOURCES
TestNonnullRefPtr.cpp
TestNumberFormat.cpp
TestOptional.cpp
+ TestOwnPtr.cpp
TestPrint.cpp
TestQueue.cpp
TestQuickSort.cpp