~aleteoryx/muditaos

ref: def5dbcfa99639957c3769bbb2eca550e287fc8c muditaos/module-utils/test/CMakeLists.txt -rw-r--r-- 3.0 KiB
def5dbcf — Mateusz Grzegorzek [EGD-5908] Fix bug in Logger + add log unit test 4 years ago
                                                                                
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
cmake_minimum_required(VERSION 3.12)

add_catch2_executable(
    NAME
        utils-conditional-invoke-tests
    SRCS
        test-Utility-ConditionalInvoke.cpp
    LIBS
        module-utils
)

# Phone number tests
add_catch2_executable(
    NAME
        utils-phonenumber
    SRCS
        unittest_phonenumber.cpp
        unittest_numbermatcher.cpp
    LIBS
        module-utils
)

# Clipboard tests
add_catch2_executable(
    NAME
        utils-clipboard
    SRCS
        unittest_clipboard.cpp
    LIBS
        module-utils
)

# UCS2 tests
add_catch2_executable(
    NAME
        utils-ucs2
    SRCS
        unittest_ucs2.cpp
        ../ucs2/UCS2.cpp
        ../ucs2/UCS2.hpp
    LIBS
        module-utils
)

# UTF8 tests
add_catch2_executable(
    NAME
        utils-utf8
    SRCS
        unittest_utf8.cpp
        ../utf8/UTF8.cpp
        ../utf8/UTF8.hpp
    LIBS
        module-utils
)

# duration tests
add_catch2_executable(
    NAME
        utils-duration
    SRCS
        unittest_duration.cpp
    LIBS
        module-utils
        iosyscalls
    DEPS
        disk_image
)

# utils tests
add_catch2_executable(
    NAME
        utils
    SRCS
        unittest_utils.cpp
    LIBS
        module-utils
        iosyscalls
    DEPS
        disk_image
)

# Math tests
add_catch2_executable(
    NAME
        utils-math
    SRCS
        test_math.cpp
    LIBS
        module-utils
)

# Log tests
add_catch2_executable(
    NAME
        utils-log
    SRCS
        test_log.cpp
    LIBS
        module-utils
)

# Logger buffer tests
add_catch2_executable(
    NAME
        utils-loggerbuffer
    SRCS
        test_LoggerBuffer.cpp
    LIBS
        module-utils
)

# ParserICS tests
#add_catch2_executable(
#    NAME
#        utils-parserIcs
#    SRCS
#        test_ParserICS.cpp
#    LIBS
#        module-utils
#)

#  time display tests
add_catch2_executable(
    NAME
        utils-time_display
    SRCS
        unittest_TimeRangeParser.cpp
    LIBS
        module-utils
        module-db
)

###########################################
# UTF8 functional tests projeet
project(test_module-utils_utf8 VERSION 1.0
    DESCRIPTION "Module-utils utf8 functional tests")

add_executable( ${PROJECT_NAME} EXCLUDE_FROM_ALL
    test_utf8.cpp
)
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/..")
target_link_libraries(${PROJECT_NAME} PRIVATE module-utils)
add_test(NAME ${PROJECT_NAME}
    COMMAND ${PROJECT_NAME}
    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    )
add_dependencies(check ${PROJECT_NAME})

###########################################
# time conversion tests project
project(test_module-utils_time VERSION 1.0
    DESCRIPTION "Module-utils time tests")

add_executable( ${PROJECT_NAME} EXCLUDE_FROM_ALL
    test_time_conversion.cpp
)
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/..")
target_link_libraries(${PROJECT_NAME} PRIVATE module-utils module-vfs)
add_test(NAME ${PROJECT_NAME}
     COMMAND ${PROJECT_NAME}
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    )
add_dependencies(check ${PROJECT_NAME})