diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-16 19:01:13 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-16 21:26:04 +0200 |
commit | 01b6e1cbf28f54793e22cc40affac7fb03511180 (patch) | |
tree | 5ac27527b2c5f36384f2c42d3907f12fa96067af /test/meson.build | |
parent | eefc0f5d80fbcb485db230c3df090b69994a75ce (diff) |
test: use GTest instead of cppunit
Diffstat (limited to 'test/meson.build')
-rw-r--r-- | test/meson.build | 68 |
1 files changed, 40 insertions, 28 deletions
diff --git a/test/meson.build b/test/meson.build index 2cc30b5d1..f88dd9f80 100644 --- a/test/meson.build +++ b/test/meson.build @@ -1,4 +1,22 @@ -cppunit_dep = dependency('cppunit', required: true) +gtest_compile_args = [ + '-Wno-undef', +] + +if compiler.get_id() == 'gcc' + gtest_compile_args += [ + '-Wno-suggest-attribute=format', + '-Wno-suggest-attribute=noreturn', + '-Wno-missing-declarations', + + # needed on Jessie for gtest's IsNullLiteralHelper + '-Wno-conversion-null', + ] +endif + +gtest_dep = declare_dependency( + dependencies: [dependency('gtest', main: true)], + compile_args: gtest_compile_args, +) executable( 'ParseSongFilter', @@ -21,33 +39,28 @@ executable( ], ) -test('test_util', executable( - 'test_util', - 'test_util.cxx', - include_directories: inc, - dependencies: [ - util_dep, - cppunit_dep, - ], -)) - -test('test_byte_reverse', executable( - 'test_byte_reverse', +test('TestUtil', executable( + 'TestUtil', + 'TestCircularBuffer.cxx', + 'TestDivideString.cxx', + 'TestMimeType.cxx', + 'TestSplitString.cxx', + 'TestUriUtil.cxx', 'test_byte_reverse.cxx', include_directories: inc, dependencies: [ util_dep, - cppunit_dep, + gtest_dep, ], )) -test('test_rewind', executable( - 'test_rewind', - 'test_rewind.cxx', +test('TestRewindInputStream', executable( + 'TestRewindInputStream', + 'TestRewindInputStream.cxx', include_directories: inc, dependencies: [ input_glue_dep, - cppunit_dep, + gtest_dep, ], )) @@ -59,7 +72,7 @@ test('test_mixramp', executable( include_directories: inc, dependencies: [ util_dep, - cppunit_dep, + gtest_dep, ], )) @@ -69,7 +82,7 @@ test('test_protocol', executable( '../src/protocol/ArgParser.cxx', include_directories: inc, dependencies: [ - cppunit_dep, + gtest_dep, ], )) @@ -80,7 +93,7 @@ test('test_queue_priority', executable( include_directories: inc, dependencies: [ util_dep, - cppunit_dep, + gtest_dep, ], )) @@ -90,7 +103,7 @@ test('TestFs', executable( include_directories: inc, dependencies: [ fs_dep, - cppunit_dep, + gtest_dep, ], )) @@ -101,7 +114,7 @@ test('TestIcu', executable( dependencies: [ util_dep, icu_dep, - cppunit_dep, + gtest_dep, ], )) @@ -265,7 +278,7 @@ if enable_database dependencies: [ tag_dep, storage_glue_dep, - cppunit_dep, + gtest_dep, ], )) endif @@ -296,7 +309,7 @@ if curl_dep.found() include_directories: inc, dependencies: [ tag_dep, - cppunit_dep, + gtest_dep, ], )) endif @@ -314,7 +327,7 @@ if archive_glue_dep.found() include_directories: inc, dependencies: [ archive_glue_dep, - cppunit_dep, + gtest_dep, ], )) @@ -457,11 +470,10 @@ test('test_pcm', executable( 'test_pcm_mix.cxx', 'test_pcm_interleave.cxx', 'test_pcm_export.cxx', - 'test_pcm_main.cxx', include_directories: inc, dependencies: [ pcm_dep, - cppunit_dep, + gtest_dep, ], )) |