summaryrefslogtreecommitdiff
path: root/AK/Tests/CMakeLists.txt
blob: 675e2a4b64f366b5897ce721a5fcd83cd72e75f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
set(AK_TEST_SOURCES
    TestAllOf.cpp
    TestArray.cpp
    TestAtomic.cpp
    TestBase64.cpp
    TestBinarySearch.cpp
    TestBitmap.cpp
    TestByteBuffer.cpp
    TestChecked.cpp
    TestCircularDeque.cpp
    TestCircularDuplexStream.cpp
    TestCircularQueue.cpp
    TestDistinctNumeric.cpp
    TestEndian.cpp
    TestFormat.cpp
    TestHashFunctions.cpp
    TestHashMap.cpp
    TestIPv4Address.cpp
    TestJSON.cpp
    TestLexicalPath.cpp
    TestMACAddress.cpp
    TestMemMem.cpp
    TestMemoryStream.cpp
    TestNeverDestroyed.cpp
    TestNonnullRefPtr.cpp
    TestNumberFormat.cpp
    TestOptional.cpp
    TestQueue.cpp
    TestQuickSort.cpp
    TestRefPtr.cpp
    TestSourceGenerator.cpp
    TestSpan.cpp
    TestString.cpp
    TestStringUtils.cpp
    TestStringView.cpp
    TestTypedTransfer.cpp
    TestURL.cpp
    TestUtf8.cpp
    TestVector.cpp
    TestWeakPtr.cpp
)

foreach(source ${AK_TEST_SOURCES})
    get_filename_component(name ${source} NAME_WE)
    add_executable(${name} ${source})
    target_link_libraries(${name} LagomCore)
    add_test(
        NAME ${name}
        COMMAND ${name}
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    )

    set_tests_properties(
        ${name}
        PROPERTIES
            FAIL_REGULAR_EXPRESSION
            "FAIL"
    )
endforeach()