ladybird/Tests/LibWeb/CMakeLists.txt
Andrew Kaster 782926601d Tests: Convert Swift tests to use Testing module where possible
The AK tests can't seem to use it because it crashes the frontend :)
2024-08-28 21:27:35 -06:00

32 lines
916 B
CMake

set(TEST_SOURCES
TestCSSIDSpeed.cpp
TestCSSPixels.cpp
TestFetchInfrastructure.cpp
TestFetchURL.cpp
TestHTMLTokenizer.cpp
TestMicrosyntax.cpp
TestMimeSniff.cpp
TestNumbers.cpp
)
foreach(source IN LISTS TEST_SOURCES)
serenity_test("${source}" LibWeb LIBS LibWeb)
endforeach()
target_link_libraries(TestFetchURL PRIVATE LibURL)
if (ENABLE_SWIFT)
find_package(SwiftTesting REQUIRED)
add_executable(TestLibWebSwift
TestLibWebSwiftBindings.swift
TestHTMLTokenizerSwift.swift
)
# FIXME: Swift doesn't seem to like object libraries for @main
target_sources(TestLibWebSwift PRIVATE ../Resources/SwiftTestMain.swift)
set_target_properties(TestLibWebSwift PROPERTIES SUFFIX .swift-testing)
target_link_libraries(TestLibWebSwift PRIVATE AK LibWeb SwiftTesting::SwiftTesting)
add_test(NAME TestLibWebSwift COMMAND TestLibWebSwift)
endif()