diff options
author | Max Kellermann <max@duempel.org> | 2013-10-16 21:55:00 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-16 23:36:36 +0200 |
commit | 401a799a1b5de5d70a6b4c1d49235af0d5618f37 (patch) | |
tree | 503db86df98400dac818fa3bbfbe20e2055a1fa4 /test/test_pcm_main.cxx | |
parent | ba98518c69d0501e67ef707f0d718cc678851415 (diff) | |
download | mpd-401a799a1b5de5d70a6b4c1d49235af0d5618f37.tar.gz mpd-401a799a1b5de5d70a6b4c1d49235af0d5618f37.tar.xz mpd-401a799a1b5de5d70a6b4c1d49235af0d5618f37.zip |
test: use the CPPUNIT framework for unit tests
Diffstat (limited to '')
-rw-r--r-- | test/test_pcm_main.cxx | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/test/test_pcm_main.cxx b/test/test_pcm_main.cxx index a221b26af..1fa580441 100644 --- a/test/test_pcm_main.cxx +++ b/test/test_pcm_main.cxx @@ -18,35 +18,16 @@ */ #include "test_pcm_all.hxx" +#include "Compiler.h" -#include <glib.h> +#include <cppunit/extensions/TestFactoryRegistry.h> +#include <cppunit/ui/text/TestRunner.h> int -main(int argc, char **argv) +main(gcc_unused int argc, gcc_unused char **argv) { - g_test_init (&argc, &argv, NULL); - g_test_add_func("/pcm/dither/24", test_pcm_dither_24); - g_test_add_func("/pcm/dither/32", test_pcm_dither_32); - g_test_add_func("/pcm/pack/pack24", test_pcm_pack_24); - g_test_add_func("/pcm/pack/unpack24", test_pcm_unpack_24); - g_test_add_func("/pcm/channels/16", test_pcm_channels_16); - g_test_add_func("/pcm/channels/32", test_pcm_channels_32); - - g_test_add_func("/pcm/volume/8", test_pcm_volume_8); - g_test_add_func("/pcm/volume/16", test_pcm_volume_16); - g_test_add_func("/pcm/volume/24", test_pcm_volume_24); - g_test_add_func("/pcm/volume/32", test_pcm_volume_32); - g_test_add_func("/pcm/volume/float", test_pcm_volume_float); - - g_test_add_func("/pcm/format/8_to_16", test_pcm_format_8_to_16); - g_test_add_func("/pcm/format/16_to_24", test_pcm_format_16_to_24); - g_test_add_func("/pcm/format/16_to_32", test_pcm_format_16_to_32); - g_test_add_func("/pcm/format/float", test_pcm_format_float); - - g_test_add_func("/pcm/mix/8", test_pcm_mix_8); - g_test_add_func("/pcm/mix/16", test_pcm_mix_16); - g_test_add_func("/pcm/mix/24", test_pcm_mix_24); - g_test_add_func("/pcm/mix/32", test_pcm_mix_32); - - g_test_run(); + CppUnit::TextUi::TestRunner runner; + auto ®istry = CppUnit::TestFactoryRegistry::getRegistry(); + runner.addTest(registry.makeTest()); + return runner.run() ? EXIT_SUCCESS : EXIT_FAILURE; } |