meson: Add unit test framework

This commit also adds the first unit test. The unit test compares the
phonetic map generated by the Python and by the C implementation and
fails if the generated maps are different.
This commit is contained in:
2021-09-22 19:22:37 +02:00
parent 638f1771a8
commit 3852c4efc9
3 changed files with 50 additions and 0 deletions

12
tests/meson.build Normal file
View File

@ -0,0 +1,12 @@
_phogen_map_c = PHOGEN_MAP_EXE.full_path()
_phogen_map_py = meson.source_root() / '@0@'.format(PHOGEN_MAP_PY[0])
_word_list = meson.source_root() / '@0@'.format(PHOGEN_WORD_LIST[0])
test('test_phogen_map',
find_program('test_phogen_map'),
env : ['PHOGEN_MAP_C=@0@'.format(_phogen_map_c),
'PHOGEN_MAP_PY=@0@'.format(_phogen_map_py),
'PHOGEN_WORD_LIST=@0@'.format(_word_list)])