diff options
author | poljar (Damir Jelić) <poljarinho@gmail.com> | 2013-06-27 19:28:09 +0200 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-07-04 12:25:30 +0300 |
commit | d806b197144733607b0ecb8678c6ee5d99ccc9ea (patch) | |
tree | 67b37aaa47303713295c43e535892822a9e11322 /src/tests | |
parent | e9822bfcb071a1b0e8f4eb67c6d471c466aeaf98 (diff) |
Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
-a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
-a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
-exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
-e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;
and:
sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
-e '181,194!s/\bTRUE\b/true/' -e \
'181,194!s/\bFALSE\b/false/' pulsecore/macro.h
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/asyncq-test.c | 4 | ||||
-rw-r--r-- | src/tests/cpu-test.c | 142 | ||||
-rw-r--r-- | src/tests/interpol-test.c | 16 | ||||
-rw-r--r-- | src/tests/lock-autospawn-test.c | 8 | ||||
-rw-r--r-- | src/tests/mainloop-test.c | 4 | ||||
-rw-r--r-- | src/tests/mcalign-test.c | 2 | ||||
-rw-r--r-- | src/tests/memblock-test.c | 6 | ||||
-rw-r--r-- | src/tests/memblockq-test.c | 20 | ||||
-rw-r--r-- | src/tests/mix-special-test.c | 12 | ||||
-rw-r--r-- | src/tests/mix-test.c | 4 | ||||
-rw-r--r-- | src/tests/remix-test.c | 2 | ||||
-rw-r--r-- | src/tests/resampler-test.c | 10 | ||||
-rw-r--r-- | src/tests/smoother-test.c | 4 | ||||
-rw-r--r-- | src/tests/stripnul.c | 4 | ||||
-rw-r--r-- | src/tests/thread-mainloop-test.c | 2 | ||||
-rw-r--r-- | src/tests/thread-test.c | 2 |
16 files changed, 121 insertions, 121 deletions
diff --git a/src/tests/asyncq-test.c b/src/tests/asyncq-test.c index 7abfb8973..22738e1c8 100644 --- a/src/tests/asyncq-test.c +++ b/src/tests/asyncq-test.c @@ -42,7 +42,7 @@ static void producer(void *_q) { pa_asyncq_push(q, PA_UINT_TO_PTR(i+1), 1); } - pa_asyncq_push(q, PA_UINT_TO_PTR(-1), TRUE); + pa_asyncq_push(q, PA_UINT_TO_PTR(-1), true); pa_log_debug("pushed end"); } @@ -54,7 +54,7 @@ static void consumer(void *_q) { pa_msleep(1000); for (i = 0;; i++) { - p = pa_asyncq_pop(q, TRUE); + p = pa_asyncq_pop(q, true); if (p == PA_UINT_TO_PTR(-1)) break; diff --git a/src/tests/cpu-test.c b/src/tests/cpu-test.c index aa4527aa5..a81e454bd 100644 --- a/src/tests/cpu-test.c +++ b/src/tests/cpu-test.c @@ -76,8 +76,8 @@ static void run_volume_test( pa_do_volume_func_t orig_func, int align, int channels, - pa_bool_t correct, - pa_bool_t perf) { + bool correct, + bool perf) { PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES]) = { 0 }; PA_DECLARE_ALIGNED(8, int16_t, s_ref[SAMPLES]) = { 0 }; @@ -155,11 +155,11 @@ START_TEST (svolume_mmx_test) { pa_log_debug("Checking MMX svolume"); for (i = 1; i <= 3; i++) { for (j = 0; j < 7; j++) - run_volume_test(mmx_func, orig_func, j, i, TRUE, FALSE); + run_volume_test(mmx_func, orig_func, j, i, true, false); } - run_volume_test(mmx_func, orig_func, 7, 1, TRUE, TRUE); - run_volume_test(mmx_func, orig_func, 7, 2, TRUE, TRUE); - run_volume_test(mmx_func, orig_func, 7, 3, TRUE, TRUE); + run_volume_test(mmx_func, orig_func, 7, 1, true, true); + run_volume_test(mmx_func, orig_func, 7, 2, true, true); + run_volume_test(mmx_func, orig_func, 7, 3, true, true); } END_TEST @@ -182,11 +182,11 @@ START_TEST (svolume_sse_test) { pa_log_debug("Checking SSE2 svolume"); for (i = 1; i <= 3; i++) { for (j = 0; j < 7; j++) - run_volume_test(sse_func, orig_func, j, i, TRUE, FALSE); + run_volume_test(sse_func, orig_func, j, i, true, false); } - run_volume_test(sse_func, orig_func, 7, 1, TRUE, TRUE); - run_volume_test(sse_func, orig_func, 7, 2, TRUE, TRUE); - run_volume_test(sse_func, orig_func, 7, 3, TRUE, TRUE); + run_volume_test(sse_func, orig_func, 7, 1, true, true); + run_volume_test(sse_func, orig_func, 7, 2, true, true); + run_volume_test(sse_func, orig_func, 7, 3, true, true); } END_TEST #endif /* defined (__i386__) || defined (__amd64__) */ @@ -211,11 +211,11 @@ START_TEST (svolume_arm_test) { pa_log_debug("Checking ARM svolume"); for (i = 1; i <= 3; i++) { for (j = 0; j < 7; j++) - run_volume_test(arm_func, orig_func, j, i, TRUE, FALSE); + run_volume_test(arm_func, orig_func, j, i, true, false); } - run_volume_test(arm_func, orig_func, 7, 1, TRUE, TRUE); - run_volume_test(arm_func, orig_func, 7, 2, TRUE, TRUE); - run_volume_test(arm_func, orig_func, 7, 3, TRUE, TRUE); + run_volume_test(arm_func, orig_func, 7, 1, true, true); + run_volume_test(arm_func, orig_func, 7, 2, true, true); + run_volume_test(arm_func, orig_func, 7, 3, true, true); } END_TEST #endif /* defined (__arm__) && defined (__linux__) */ @@ -243,10 +243,10 @@ START_TEST (svolume_orc_test) { pa_log_debug("Checking Orc svolume"); for (i = 1; i <= 2; i++) { for (j = 0; j < 7; j++) - run_volume_test(orc_func, orig_func, j, i, TRUE, FALSE); + run_volume_test(orc_func, orig_func, j, i, true, false); } - run_volume_test(orc_func, orig_func, 7, 1, TRUE, TRUE); - run_volume_test(orc_func, orig_func, 7, 2, TRUE, TRUE); + run_volume_test(orc_func, orig_func, 7, 1, true, true); + run_volume_test(orc_func, orig_func, 7, 2, true, true); } END_TEST @@ -265,8 +265,8 @@ static void run_conv_test_float_to_s16( pa_convert_func_t func, pa_convert_func_t orig_func, int align, - pa_bool_t correct, - pa_bool_t perf) { + bool correct, + bool perf) { PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES]) = { 0 }; PA_DECLARE_ALIGNED(8, int16_t, s_ref[SAMPLES]) = { 0 }; @@ -318,8 +318,8 @@ static void run_conv_test_s16_to_float( pa_convert_func_t func, pa_convert_func_t orig_func, int align, - pa_bool_t correct, - pa_bool_t perf) { + bool correct, + bool perf) { PA_DECLARE_ALIGNED(8, float, f[SAMPLES]) = { 0 }; PA_DECLARE_ALIGNED(8, float, f_ref[SAMPLES]) = { 0 }; @@ -381,14 +381,14 @@ START_TEST (sconv_sse2_test) { sse2_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE); pa_log_debug("Checking SSE2 sconv (float -> s16)"); - run_conv_test_float_to_s16(sse2_func, orig_func, 0, TRUE, FALSE); - run_conv_test_float_to_s16(sse2_func, orig_func, 1, TRUE, FALSE); - run_conv_test_float_to_s16(sse2_func, orig_func, 2, TRUE, FALSE); - run_conv_test_float_to_s16(sse2_func, orig_func, 3, TRUE, FALSE); - run_conv_test_float_to_s16(sse2_func, orig_func, 4, TRUE, FALSE); - run_conv_test_float_to_s16(sse2_func, orig_func, 5, TRUE, FALSE); - run_conv_test_float_to_s16(sse2_func, orig_func, 6, TRUE, FALSE); - run_conv_test_float_to_s16(sse2_func, orig_func, 7, TRUE, TRUE); + run_conv_test_float_to_s16(sse2_func, orig_func, 0, true, false); + run_conv_test_float_to_s16(sse2_func, orig_func, 1, true, false); + run_conv_test_float_to_s16(sse2_func, orig_func, 2, true, false); + run_conv_test_float_to_s16(sse2_func, orig_func, 3, true, false); + run_conv_test_float_to_s16(sse2_func, orig_func, 4, true, false); + run_conv_test_float_to_s16(sse2_func, orig_func, 5, true, false); + run_conv_test_float_to_s16(sse2_func, orig_func, 6, true, false); + run_conv_test_float_to_s16(sse2_func, orig_func, 7, true, true); } END_TEST @@ -408,14 +408,14 @@ START_TEST (sconv_sse_test) { sse_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE); pa_log_debug("Checking SSE sconv (float -> s16)"); - run_conv_test_float_to_s16(sse_func, orig_func, 0, TRUE, FALSE); - run_conv_test_float_to_s16(sse_func, orig_func, 1, TRUE, FALSE); - run_conv_test_float_to_s16(sse_func, orig_func, 2, TRUE, FALSE); - run_conv_test_float_to_s16(sse_func, orig_func, 3, TRUE, FALSE); - run_conv_test_float_to_s16(sse_func, orig_func, 4, TRUE, FALSE); - run_conv_test_float_to_s16(sse_func, orig_func, 5, TRUE, FALSE); - run_conv_test_float_to_s16(sse_func, orig_func, 6, TRUE, FALSE); - run_conv_test_float_to_s16(sse_func, orig_func, 7, TRUE, TRUE); + run_conv_test_float_to_s16(sse_func, orig_func, 0, true, false); + run_conv_test_float_to_s16(sse_func, orig_func, 1, true, false); + run_conv_test_float_to_s16(sse_func, orig_func, 2, true, false); + run_conv_test_float_to_s16(sse_func, orig_func, 3, true, false); + run_conv_test_float_to_s16(sse_func, orig_func, 4, true, false); + run_conv_test_float_to_s16(sse_func, orig_func, 5, true, false); + run_conv_test_float_to_s16(sse_func, orig_func, 6, true, false); + run_conv_test_float_to_s16(sse_func, orig_func, 7, true, true); } END_TEST #endif /* defined (__i386__) || defined (__amd64__) */ @@ -441,24 +441,24 @@ START_TEST (sconv_neon_test) { neon_to_func = pa_get_convert_to_float32ne_function(PA_SAMPLE_S16LE); pa_log_debug("Checking NEON sconv (float -> s16)"); - run_conv_test_float_to_s16(neon_from_func, orig_from_func, 0, TRUE, FALSE); - run_conv_test_float_to_s16(neon_from_func, orig_from_func, 1, TRUE, FALSE); - run_conv_test_float_to_s16(neon_from_func, orig_from_func, 2, TRUE, FALSE); - run_conv_test_float_to_s16(neon_from_func, orig_from_func, 3, TRUE, FALSE); - run_conv_test_float_to_s16(neon_from_func, orig_from_func, 4, TRUE, FALSE); - run_conv_test_float_to_s16(neon_from_func, orig_from_func, 5, TRUE, FALSE); - run_conv_test_float_to_s16(neon_from_func, orig_from_func, 6, TRUE, FALSE); - run_conv_test_float_to_s16(neon_from_func, orig_from_func, 7, TRUE, TRUE); + run_conv_test_float_to_s16(neon_from_func, orig_from_func, 0, true, false); + run_conv_test_float_to_s16(neon_from_func, orig_from_func, 1, true, false); + run_conv_test_float_to_s16(neon_from_func, orig_from_func, 2, true, false); + run_conv_test_float_to_s16(neon_from_func, orig_from_func, 3, true, false); + run_conv_test_float_to_s16(neon_from_func, orig_from_func, 4, true, false); + run_conv_test_float_to_s16(neon_from_func, orig_from_func, 5, true, false); + run_conv_test_float_to_s16(neon_from_func, orig_from_func, 6, true, false); + run_conv_test_float_to_s16(neon_from_func, orig_from_func, 7, true, true); pa_log_debug("Checking NEON sconv (s16 -> float)"); - run_conv_test_s16_to_float(neon_to_func, orig_to_func, 0, TRUE, FALSE); - run_conv_test_s16_to_float(neon_to_func, orig_to_func, 1, TRUE, FALSE); - run_conv_test_s16_to_float(neon_to_func, orig_to_func, 2, TRUE, FALSE); - run_conv_test_s16_to_float(neon_to_func, orig_to_func, 3, TRUE, FALSE); - run_conv_test_s16_to_float(neon_to_func, orig_to_func, 4, TRUE, FALSE); - run_conv_test_s16_to_float(neon_to_func, orig_to_func, 5, TRUE, FALSE); - run_conv_test_s16_to_float(neon_to_func, orig_to_func, 6, TRUE, FALSE); - run_conv_test_s16_to_float(neon_to_func, orig_to_func, 7, TRUE, TRUE); + run_conv_test_s16_to_float(neon_to_func, orig_to_func, 0, true, false); + run_conv_test_s16_to_float(neon_to_func, orig_to_func, 1, true, false); + run_conv_test_s16_to_float(neon_to_func, orig_to_func, 2, true, false); + run_conv_test_s16_to_float(neon_to_func, orig_to_func, 3, true, false); + run_conv_test_s16_to_float(neon_to_func, orig_to_func, 4, true, false); + run_conv_test_s16_to_float(neon_to_func, orig_to_func, 5, true, false); + run_conv_test_s16_to_float(neon_to_func, orig_to_func, 6, true, false); + run_conv_test_s16_to_float(neon_to_func, orig_to_func, 7, true, true); } END_TEST #endif /* HAVE_NEON */ @@ -478,8 +478,8 @@ static void run_remap_test_mono_stereo_float( pa_do_remap_func_t func, pa_do_remap_func_t orig_func, int align, - pa_bool_t correct, - pa_bool_t perf) { + bool correct, + bool perf) { PA_DECLARE_ALIGNED(8, float, s_ref[SAMPLES*2]) = { 0 }; PA_DECLARE_ALIGNED(8, float, s[SAMPLES*2]) = { 0 }; @@ -528,8 +528,8 @@ static void run_remap_test_mono_stereo_s16( pa_do_remap_func_t func, pa_do_remap_func_t orig_func, int align, - pa_bool_t correct, - pa_bool_t perf) { + bool correct, + bool perf) { PA_DECLARE_ALIGNED(8, int16_t, s_ref[SAMPLES*2]) = { 0 }; PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES*2]) = { 0 }; @@ -605,10 +605,10 @@ static void remap_test_mono_stereo_float( return; } - run_remap_test_mono_stereo_float(&remap, func, orig_func, 0, TRUE, FALSE); - run_remap_test_mono_stereo_float(&remap, func, orig_func, 1, TRUE, FALSE); - run_remap_test_mono_stereo_float(&remap, func, orig_func, 2, TRUE, FALSE); - run_remap_test_mono_stereo_float(&remap, func, orig_func, 3, TRUE, TRUE); + run_remap_test_mono_stereo_float(&remap, func, orig_func, 0, true, false); + run_remap_test_mono_stereo_float(&remap, func, orig_func, 1, true, false); + run_remap_test_mono_stereo_float(&remap, func, orig_func, 2, true, false); + run_remap_test_mono_stereo_float(&remap, func, orig_func, 3, true, true); } static void remap_test_mono_stereo_s16( @@ -644,10 +644,10 @@ static void remap_test_mono_stereo_s16( return; } - run_remap_test_mono_stereo_s16(&remap, func, orig_func, 0, TRUE, FALSE); - run_remap_test_mono_stereo_s16(&remap, func, orig_func, 1, TRUE, FALSE); - run_remap_test_mono_stereo_s16(&remap, func, orig_func, 2, TRUE, FALSE); - run_remap_test_mono_stereo_s16(&remap, func, orig_func, 3, TRUE, TRUE); + run_remap_test_mono_stereo_s16(&remap, func, orig_func, 0, true, false); + run_remap_test_mono_stereo_s16(&remap, func, orig_func, 1, true, false); + run_remap_test_mono_stereo_s16(&remap, func, orig_func, 2, true, false); + run_remap_test_mono_stereo_s16(&remap, func, orig_func, 3, true, true); } #if defined (__i386__) || defined (__amd64__) @@ -729,8 +729,8 @@ static void run_mix_test( pa_do_mix_func_t orig_func, int align, int channels, - pa_bool_t correct, - pa_bool_t perf) { + bool correct, + bool perf) { PA_DECLARE_ALIGNED(8, int16_t, in0[SAMPLES * 4]) = { 0 }; PA_DECLARE_ALIGNED(8, int16_t, in1[SAMPLES * 4]) = { 0 }; @@ -753,15 +753,15 @@ static void run_mix_test( samples_ref = out_ref + (8 - align); nsamples = channels * (SAMPLES - (8 - align)); - fail_unless((pool = pa_mempool_new(FALSE, 0)) != NULL, NULL); + fail_unless((pool = pa_mempool_new(false, 0)) != NULL, NULL); pa_random(samples0, nsamples * sizeof(int16_t)); - c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), FALSE); + c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false); c0.length = pa_memblock_get_length(c0.memblock); c0.index = 0; pa_random(samples1, nsamples * sizeof(int16_t)); - c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), FALSE); + c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), false); c1.length = pa_memblock_get_length(c1.memblock); c1.index = 0; @@ -842,7 +842,7 @@ START_TEST (mix_neon_test) { neon_func = pa_get_mix_func(PA_SAMPLE_S16NE); pa_log_debug("Checking NEON mix"); - run_mix_test(neon_func, orig_func, 7, 2, TRUE, TRUE); + run_mix_test(neon_func, orig_func, 7, 2, true, true); } END_TEST #endif /* HAVE_NEON */ diff --git a/src/tests/interpol-test.c b/src/tests/interpol-test.c index 6303c5e81..1d1e52afd 100644 --- a/src/tests/interpol-test.c +++ b/src/tests/interpol-test.c @@ -43,7 +43,7 @@ static pa_context *context = NULL; static pa_stream *stream = NULL; static pa_mainloop_api *mainloop_api = NULL; -static pa_bool_t playback = TRUE; +static bool playback = true; static pa_usec_t latency = 0; static const char *bname = NULL; @@ -156,7 +156,7 @@ START_TEST (interpol_test) { struct timeval start, last_info = { 0, 0 }; pa_usec_t old_t = 0, old_rtc = 0; #ifdef CORK - pa_bool_t corked = FALSE; + bool corked = false; #endif /* Set up a new main loop */ @@ -181,10 +181,10 @@ START_TEST (interpol_test) { /* for (k = 0; k < 2000; k++) */ /* #endif */ { - pa_bool_t success = FALSE, changed = FALSE; + bool success = false, changed = false; pa_usec_t t, rtc, d; struct timeval now, tv; - pa_bool_t playing = FALSE; + bool playing = false; pa_threaded_mainloop_lock(m); @@ -193,15 +193,15 @@ START_TEST (interpol_test) { if (pa_stream_get_time(stream, &t) >= 0 && pa_stream_get_latency(stream, &d, NULL) >= 0) - success = TRUE; + success = true; if ((info = pa_stream_get_timing_info(stream))) { if (memcmp(&last_info, &info->timestamp, sizeof(struct timeval))) { - changed = TRUE; + changed = true; last_info = info->timestamp; } if (info->playing) - playing = TRUE; + playing = true; } } @@ -211,7 +211,7 @@ START_TEST (interpol_test) { if (success) { #ifdef CORK - pa_bool_t cork_now; + bool cork_now; #endif rtc = pa_timeval_diff(&now, &start); pa_log_info("%i\t%llu\t%llu\t%llu\t%llu\t%lli\t%u\t%u\t%llu\t%llu\n", k, diff --git a/src/tests/lock-autospawn-test.c b/src/tests/lock-autospawn-test.c index 1aa3bcae2..89d402e7e 100644 --- a/src/tests/lock-autospawn-test.c +++ b/src/tests/lock-autospawn-test.c @@ -38,7 +38,7 @@ static void thread_func(void*k) { pa_log("%i, Trying to acquire lock.", PA_PTR_TO_INT(k)); - fail_unless(pa_autospawn_lock_acquire(TRUE) > 0); + fail_unless(pa_autospawn_lock_acquire(true) > 0); pa_log("%i, Got the lock!, Sleeping for 5s", PA_PTR_TO_INT(k)); @@ -48,7 +48,7 @@ static void thread_func(void*k) { pa_autospawn_lock_release(); - pa_autospawn_lock_done(FALSE); + pa_autospawn_lock_done(false); } static void thread_func2(void *k) { @@ -62,7 +62,7 @@ static void thread_func2(void *k) { struct pollfd pollfd; int j; - if ((j = pa_autospawn_lock_acquire(FALSE)) > 0) + if ((j = pa_autospawn_lock_acquire(false)) > 0) break; fail_unless(j == 0); @@ -84,7 +84,7 @@ static void thread_func2(void *k) { pa_autospawn_lock_release(); - pa_autospawn_lock_done(FALSE); + pa_autospawn_lock_done(false); } START_TEST (lockautospawn_test) { diff --git a/src/tests/mainloop-test.c b/src/tests/mainloop-test.c index 3b062f8c5..d6732002e 100644 --- a/src/tests/mainloop-test.c +++ b/src/tests/mainloop-test.c @@ -77,7 +77,7 @@ START_TEST (mainloop_test) { #ifdef GLIB_MAIN_LOOP pa_glib_mainloop *g; - glib_main_loop = g_main_loop_new(NULL, FALSE); + glib_main_loop = g_main_loop_new(NULL, false); fail_if(!glib_main_loop); g = pa_glib_mainloop_new(NULL); @@ -101,7 +101,7 @@ START_TEST (mainloop_test) { de = a->defer_new(a, dcb, NULL); fail_if(!de); - te = a->time_new(a, pa_timeval_rtstore(&tv, pa_rtclock_now() + 2 * PA_USEC_PER_SEC, TRUE), tcb, NULL); + te = a->time_new(a, pa_timeval_rtstore(&tv, pa_rtclock_now() + 2 * PA_USEC_PER_SEC, true), tcb, NULL); #if defined(GLIB_MAIN_LOOP) g_main_loop_run(glib_main_loop); diff --git a/src/tests/mcalign-test.c b/src/tests/mcalign-test.c index 75a71dd1a..bd192b5ba 100644 --- a/src/tests/mcalign-test.c +++ b/src/tests/mcalign-test.c @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) { pa_mcalign *a; pa_memchunk c; - p = pa_mempool_new(FALSE, 0); + p = pa_mempool_new(false, 0); a = pa_mcalign_new(11); diff --git a/src/tests/memblock-test.c b/src/tests/memblock-test.c index a48daf7ed..d46da6ca0 100644 --- a/src/tests/memblock-test.c +++ b/src/tests/memblock-test.c @@ -82,11 +82,11 @@ START_TEST (memblock_test) { const char txt[] = "This is a test!"; - pool_a = pa_mempool_new(TRUE, 0); + pool_a = pa_mempool_new(true, 0); fail_unless(pool_a != NULL); - pool_b = pa_mempool_new(TRUE, 0); + pool_b = pa_mempool_new(true, 0); fail_unless(pool_b != NULL); - pool_c = pa_mempool_new(TRUE, 0); + pool_c = pa_mempool_new(true, 0); fail_unless(pool_c != NULL); pa_mempool_get_shm_id(pool_a, &id_a); diff --git a/src/tests/memblockq-test.c b/src/tests/memblockq-test.c index 11ac90532..a00182ad5 100644 --- a/src/tests/memblockq-test.c +++ b/src/tests/memblockq-test.c @@ -110,7 +110,7 @@ START_TEST (memblockq_test) { pa_log_set_level(PA_LOG_DEBUG); - p = pa_mempool_new(FALSE, 0); + p = pa_mempool_new(false, 0); silence.memblock = pa_memblock_new_fixed(p, (char*) "__", 2, 1); fail_unless(silence.memblock != NULL); @@ -157,45 +157,45 @@ START_TEST (memblockq_test) { ret = pa_memblockq_push(bq, &chunk4); fail_unless(ret == 0); - pa_memblockq_seek(bq, -6, 0, TRUE); + pa_memblockq_seek(bq, -6, 0, true); ret = pa_memblockq_push(bq, &chunk3); fail_unless(ret == 0); - pa_memblockq_seek(bq, -2, 0, TRUE); + pa_memblockq_seek(bq, -2, 0, true); ret = pa_memblockq_push(bq, &chunk1); fail_unless(ret == 0); - pa_memblockq_seek(bq, -10, 0, TRUE); + pa_memblockq_seek(bq, -10, 0, true); ret = pa_memblockq_push(bq, &chunk4); fail_unless(ret == 0); - pa_memblockq_seek(bq, 10, 0, TRUE); + pa_memblockq_seek(bq, 10, 0, true); ret = pa_memblockq_push(bq, &chunk1); fail_unless(ret == 0); - pa_memblockq_seek(bq, -6, 0, TRUE); + pa_memblockq_seek(bq, -6, 0, true); ret = pa_memblockq_push(bq, &chunk2); fail_unless(ret == 0); /* Test splitting */ - pa_memblockq_seek(bq, -12, 0, TRUE); + pa_memblockq_seek(bq, -12, 0, true); ret = pa_memblockq_push(bq, &chunk1); fail_unless(ret == 0); - pa_memblockq_seek(bq, 20, 0, TRUE); + pa_memblockq_seek(bq, 20, 0, true); /* Test merging */ ret = pa_memblockq_push(bq, &chunk3); fail_unless(ret == 0); - pa_memblockq_seek(bq, -2, 0, TRUE); + pa_memblockq_seek(bq, -2, 0, true); chunk3.index += 2; chunk3.length -= 2; ret = pa_memblockq_push(bq, &chunk3); fail_unless(ret == 0); - pa_memblockq_seek(bq, 30, PA_SEEK_RELATIVE, TRUE); + pa_memblockq_seek(bq, 30, PA_SEEK_RELATIVE, true); dump(bq, 0); diff --git a/src/tests/mix-special-test.c b/src/tests/mix-special-test.c index 3d36116a5..8cf893a0c 100644 --- a/src/tests/mix-special-test.c +++ b/src/tests/mix-special-test.c @@ -208,15 +208,15 @@ START_TEST (mix_special_1ch_test) { pa_mix_info m[2]; unsigned nsamples = SAMPLES; - fail_unless((pool = pa_mempool_new(FALSE, 0)) != NULL, NULL); + fail_unless((pool = pa_mempool_new(false, 0)) != NULL, NULL); pa_random(samples0, nsamples * sizeof(int16_t)); - c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), FALSE); + c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false); c0.length = pa_memblock_get_length(c0.memblock); c0.index = 0; pa_random(samples1, nsamples * sizeof(int16_t)); - c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), FALSE); + c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), false); c1.length = pa_memblock_get_length(c1.memblock); c1.index = 0; @@ -262,15 +262,15 @@ START_TEST (mix_special_2ch_test) { pa_mix_info m[2]; unsigned nsamples = SAMPLES * 2; - fail_unless((pool = pa_mempool_new(FALSE, 0)) != NULL, NULL); + fail_unless((pool = pa_mempool_new(false, 0)) != NULL, NULL); pa_random(samples0, nsamples * sizeof(int16_t)); - c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), FALSE); + c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false); c0.length = pa_memblock_get_length(c0.memblock); c0.index = 0; pa_random(samples1, nsamples * sizeof(int16_t)); - c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), FALSE); + c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), false); c1.length = pa_memblock_get_length(c1.memblock); c1.index = 0; diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c index e2ef49065..ae6520970 100644 --- a/src/tests/mix-test.c +++ b/src/tests/mix-test.c @@ -407,7 +407,7 @@ START_TEST (mix_test) { if (!getenv("MAKE_CHECK")) pa_log_set_level(PA_LOG_DEBUG); - fail_unless((pool = pa_mempool_new(FALSE, 0)) != NULL, NULL); + fail_unless((pool = pa_mempool_new(false, 0)) != NULL, NULL); a.channels = 1; a.rate = 44100; @@ -451,7 +451,7 @@ START_TEST (mix_test) { k.index = 0; ptr = pa_memblock_acquire_chunk(&k); - pa_mix(m, 2, ptr, k.length, &a, NULL, FALSE); + pa_mix(m, 2, ptr, k.length, &a, NULL, false); pa_memblock_release(k.memblock); compare_block(&a, &k, 2); diff --git a/src/tests/remix-test.c b/src/tests/remix-test.c index 9d169bea2..b62801135 100644 --- a/src/tests/remix-test.c +++ b/src/tests/remix-test.c @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) { pa_log_set_level(PA_LOG_DEBUG); - pa_assert_se(pool = pa_mempool_new(FALSE, 0)); + pa_assert_se(pool = pa_mempool_new(false, 0)); for (i = 0; maps[i].channels > 0; i++) for (j = 0; maps[j].channels > 0; j++) { diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c index e07a3d636..fdd263b0c 100644 --- a/src/tests/resampler-test.c +++ b/src/tests/resampler-test.c @@ -302,7 +302,7 @@ int main(int argc, char *argv[]) { pa_mempool *pool = NULL; pa_sample_spec a, b; int ret = 1, c; - pa_bool_t all_formats = TRUE; + bool all_formats = true; pa_resample_method_t method; int seconds; @@ -331,7 +331,7 @@ int main(int argc, char *argv[]) { if (!getenv("MAKE_CHECK")) pa_log_set_level(PA_LOG_INFO); - pa_assert_se(pool = pa_mempool_new(FALSE, 0)); + pa_assert_se(pool = pa_mempool_new(false, 0)); a.channels = b.channels = 1; a.rate = b.rate = 44100; @@ -368,7 +368,7 @@ int main(int argc, char *argv[]) { case ARG_FROM_SAMPLEFORMAT: a.format = pa_parse_sample_format(optarg); - all_formats = FALSE; + all_formats = false; break; case ARG_FROM_SAMPLERATE: @@ -381,7 +381,7 @@ int main(int argc, char *argv[]) { case ARG_TO_SAMPLEFORMAT: b.format = pa_parse_sample_format(optarg); - all_formats = FALSE; + all_formats = false; break; case ARG_TO_SAMPLERATE: @@ -407,7 +407,7 @@ int main(int argc, char *argv[]) { } ret = 0; - pa_assert_se(pool = pa_mempool_new(FALSE, 0)); + pa_assert_se(pool = pa_mempool_new(false, 0)); if (!all_formats) { diff --git a/src/tests/smoother-test.c b/src/tests/smoother-test.c index eac824e80..85d9d89fc 100644 --- a/src/tests/smoother-test.c +++ b/src/tests/smoother-test.c @@ -66,7 +66,7 @@ START_TEST (smoother_test) { msec[u+1] = 0; } - s = pa_smoother_new(700*PA_USEC_PER_MSEC, 2000*PA_USEC_PER_MSEC, FALSE, TRUE, 6, 0, TRUE); + s = pa_smoother_new(700*PA_USEC_PER_MSEC, 2000*PA_USEC_PER_MSEC, false, true, 6, 0, true); for (x = 0, u = 0; x < PA_USEC_PER_SEC * 10; x += PA_USEC_PER_MSEC) { @@ -76,7 +76,7 @@ START_TEST (smoother_test) { u += 2; if (u < PA_ELEMENTSOF(msec)) - pa_smoother_resume(s, (pa_usec_t) msec[u] * PA_USEC_PER_MSEC, TRUE); + pa_smoother_resume(s, (pa_usec_t) msec[u] * PA_USEC_PER_MSEC, true); } pa_log_debug("%llu\t%llu", (unsigned long long) (x/PA_USEC_PER_MSEC), (unsigned long long) (pa_smoother_get(s, x)/PA_USEC_PER_MSEC)); diff --git a/src/tests/stripnul.c b/src/tests/stripnul.c index d677ad202..e68c7bb26 100644 --- a/src/tests/stripnul.c +++ b/src/tests/stripnul.c @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) { FILE *i, *o; size_t granularity; - pa_bool_t found = FALSE; + bool found = false; uint8_t *zero; pa_assert_se(argc >= 2); @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) { for (p = buffer; ((size_t) (p-buffer)/granularity) < k; p += granularity) if (memcmp(p, zero, granularity)) { size_t left; - found = TRUE; + found = true; left = (size_t) (k - (size_t) (p-buffer)/granularity); pa_assert_se(fwrite(p, granularity, left, o) == left); break; diff --git a/src/tests/thread-mainloop-test.c b/src/tests/thread-mainloop-test.c index d2f6152bf..e62f66bd3 100644 --- a/src/tests/thread-mainloop-test.c +++ b/src/tests/thread-mainloop-test.c @@ -58,7 +58,7 @@ START_TEST (thread_mainloop_test) { fail_unless(!pa_threaded_mainloop_in_thread(m)); - a->time_new(a, pa_timeval_rtstore(&tv, pa_rtclock_now() + 5 * PA_USEC_PER_SEC, TRUE), tcb, m); + a->time_new(a, pa_timeval_rtstore(&tv, pa_rtclock_now() + 5 * PA_USEC_PER_SEC, true), tcb, m); fprintf(stderr, "waiting 5s (signal)\n"); pa_threaded_mainloop_wait(m); diff --git a/src/tests/thread-test.c b/src/tests/thread-test.c index de4813c96..330181d4a 100644 --- a/src/tests/thread-test.c +++ b/src/tests/thread-test.c @@ -100,7 +100,7 @@ START_TEST (thread_test) { if (!getenv("MAKE_CHECK")) pa_log_set_level(PA_LOG_DEBUG); - mutex = pa_mutex_new(FALSE, FALSE); + mutex = pa_mutex_new(false, false); cond1 = pa_cond_new(); cond2 = pa_cond_new(); tls = pa_tls_new(pa_xfree); |