mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
fe672989a9
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.
20 lines
695 B
CMake
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)
|