diff options
Diffstat (limited to 'subprojects/exess/test/meson.build')
-rw-r--r-- | subprojects/exess/test/meson.build | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/subprojects/exess/test/meson.build b/subprojects/exess/test/meson.build new file mode 100644 index 00000000..972793f0 --- /dev/null +++ b/subprojects/exess/test/meson.build @@ -0,0 +1,76 @@ +autoship = find_program('autoship', required: false) + +test_args = [] + +if get_option('strict') + if cc.get_id() == 'clang' + test_args = [ + '-Wno-float-equal', + ] + elif cc.get_id() == 'gcc' + test_args = [ + '-Wno-float-equal', + '-Wno-suggest-attribute=pure', + ] + elif cc.get_id() == 'msvc' + test_args = [ + '/wd4996', # POSIX name is deprecated + ] + endif +endif + +private_tests = [ + 'bigint', + 'int_math', +] + +foreach unit : private_tests + test(unit, + executable('test_@0@'.format(unit), + 'test_@0@.c'.format(unit), + c_args: exess_c_args + prog_args + test_args, + dependencies: exess_static_dep, + include_directories: include_directories('../src')), + suite: 'private') +endforeach + +public_tests = [ + 'base64', + 'boolean', + 'byte', + 'canonical', + 'coerce', + 'datatype', + 'date', + 'datetime', + 'decimal', + 'double', + 'duration', + 'float', + 'hex', + 'int', + 'long', + 'short', + 'strerror', + 'time', + 'timezone', + 'ubyte', + 'uint', + 'ulong', + 'ushort', + 'variant', +] + +foreach unit : public_tests + test(unit, + executable('test_@0@'.format(unit), + 'test_@0@.c'.format(unit), + c_args: exess_c_args + prog_args + test_args, + dependencies: [m_dep, exess_dep], + include_directories: include_directories('../src')), + suite: 'public') +endforeach + +if autoship.found() + test('autoship', autoship, args: ['test', exess_src_root], suite: 'data') +endif |