ladybird/Tests/LibCore/CMakeLists.txt
Zaggy1024 fe672989a9 LibCore: Add a class for thread-safe promises
Since the existing Promise class is designed with deferred tasks on the
main thread only, we need a new class that will ensure we can handle
promises that are resolved/rejected off the main thread.

This new class ensures that the callbacks are only called on the same
thread that the promise is fulfilled from. If the callbacks are not set
before the thread tries to fulfill the promise, it will spin until they
are so that they will run on that thread.
2023-08-04 13:49:36 -06:00

20 lines
695 B
CMake

set(TEST_SOURCES
TestLibCoreArgsParser.cpp
TestLibCoreDeferredInvoke.cpp
TestLibCoreFilePermissionsMask.cpp
TestLibCoreFileWatcher.cpp
TestLibCorePromise.cpp
TestLibCoreSharedSingleProducerCircularQueue.cpp
TestLibCoreStream.cpp
)
foreach(source IN LISTS TEST_SOURCES)
serenity_test("${source}" LibCore)
endforeach()
target_link_libraries(TestLibCorePromise PRIVATE LibThreading)
# NOTE: Required because of the LocalServer tests
target_link_libraries(TestLibCoreStream PRIVATE LibThreading)
target_link_libraries(TestLibCoreSharedSingleProducerCircularQueue PRIVATE LibThreading)
install(FILES long_lines.txt 10kb.txt small.txt DESTINATION usr/Tests/LibCore)