Add some unittests

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-18 22:34:59 +00:00
parent 2cefefb531
commit aa37c4f4ca
5 changed files with 59 additions and 2 deletions

View File

@@ -62,8 +62,16 @@ if get_option('xrescheck')
srcs += [ 'xrescheck.c' ]
endif
if get_option('unittest')
cflags += ['-DUNIT_TEST']
endif
subdir('backend')
executable('compton', srcs, c_args: cflags,
dependencies: [ base_deps, deps ],
compton = executable('compton', srcs, c_args: cflags,
dependencies: [ base_deps, deps, test_h_dep ],
install: true, include_directories: compton_inc)
if get_option('unittest')
test('compton unittest', compton, args: [ '--unittest' ])
endif