summaryrefslogtreecommitdiffstats
path: root/subprojects/libhandy/tests/meson.build
blob: c80e96e727724962ded495e4f1d373bdbffce303 (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
if get_option('tests')

test_env = [
  'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
  'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
  'G_DEBUG=gc-friendly,fatal-warnings',
  'GSETTINGS_BACKEND=memory',
  'PYTHONDONTWRITEBYTECODE=yes',
  'MALLOC_CHECK_=2',
]

test_cflags = [
  '-DHDY_LOG_DOMAIN="Handy"',
  '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()),
]

test_link_args = [
  '-fPIC',
]

test_names = [
  'test-action-row',
  'test-application-window',
  'test-avatar',
  'test-carousel',
  'test-carousel-indicator-dots',
  'test-carousel-indicator-lines',
  'test-combo-row',
  'test-deck',
  'test-expander-row',
  'test-header-bar',
  'test-header-group',
  'test-keypad',
  'test-leaflet',
  'test-preferences-group',
  'test-preferences-page',
  'test-preferences-row',
  'test-preferences-window',
  'test-search-bar',
  'test-squeezer',
  'test-swipe-group',
  'test-value-object',
  'test-view-switcher',
  'test-view-switcher-bar',
  'test-window',
  'test-window-handle',
]

foreach test_name : test_names
  t = executable(test_name, [test_name + '.c'] + libhandy_generated_headers,
                       c_args: test_cflags,
                    link_args: test_link_args,
                 dependencies: libhandy_deps + [libhandy_dep],
                          pie: true,
                )
  test(test_name, t, env: test_env)
endforeach

endif