-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
62 lines (54 loc) · 1.92 KB
/
meson.build
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
project(
'integer-toolkit',
'c',
version: '1.3.4',
default_options: ['default_library=static', 'c_std=c11', 'warning_level=3'],
license: 'MIT',
license_files: 'LICENSE'
)
integer_toolkit_incdir = include_directories('include')
integer_toolkit_lib = library(
'integer-toolkit',
'src/integer_toolkit.c',
include_directories: integer_toolkit_incdir
)
integer_toolkit_dep = declare_dependency(
link_with: integer_toolkit_lib,
include_directories: integer_toolkit_incdir
)
unity_subproject = subproject('unity')
unity_dependency = unity_subproject.get_variable('unity_dep')
unity_gen_runner = unity_subproject.get_variable('gen_test_runner')
test_cases = [
['TestDivisibilityFunctions.c', 'Test Divisibility Functions'],
['TestIntegerInspection.c', 'Test Integer Inspection Functions'],
['TestIntegerManipulation.c', 'Test Integer Manipulation Functions'],
['TestIntegerProperties.c', 'Test Integer Properties and Validation Functions'],
['TestMinMaxFunctions.c', 'Test Min and Max Functions'],
['TestOccurrenceCounting.c', 'Test Occurrence Counting Functions'],
['TestRangeFunctions.c', 'Test Range Functions'],
['TestReductionFunctions.c', 'Test Reduction Functions'],
['TestRemoveFunctions.c', 'Test Remove Functions'],
['TestSearchFunctions.c', 'Test Search Functions'],
['TestSortingFunctions.c', 'Test Sorting Functions'],
['TestStringLikeFunctions.c', 'Test String-Like Functions'],
['TestUtilityFunctions.c', 'Test Utility Functions']
]
foreach test_case : test_cases
filename = test_case[0]
description = test_case[1]
test_executable = executable(
'test_' + filename,
[
files(
'src' / 'integer_toolkit.c',
'test' / filename
),
unity_gen_runner.process('test' / filename)
],
link_with: integer_toolkit_lib,
include_directories: [integer_toolkit_incdir],
dependencies: [unity_dependency]
)
test(description, test_executable)
endforeach