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:
12
tests/meson.build
Normal file
12
tests/meson.build
Normal 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)])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user