cmocka: add stdint.h includes

As written in cmocka documentation,
these headers have to be included before cmocka.h:

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
Janusz Jankowski 2019-03-19 20:32:42 +01:00 committed by Liam Girdwood
parent 0cc895d609
commit f9494d9ce5
34 changed files with 38 additions and 2 deletions

View File

@ -67,6 +67,10 @@ function(cmocka_test test_name)
target_link_libraries(${test_name} PRIVATE cmocka)
target_link_libraries(${test_name} PRIVATE sof_options)
target_compile_definitions(${test_name} PRIVATE -DCHECK)
# Cmocka requires this define for stdint.h that defines uintptr
target_compile_definitions(${test_name} PRIVATE -D_UINTPTR_T_DEFINED)
add_test(NAME ${test_name} COMMAND xt-run --exit_with_target_code ${test_name})
endfunction()

View File

@ -37,6 +37,7 @@
#include <stddef.h>
#include <setjmp.h>
#include <math.h>
#include <stdint.h>
#include <cmocka.h>
static void test_audio_buffer_copy_underrun(void **state)

View File

@ -37,6 +37,7 @@
#include <stddef.h>
#include <setjmp.h>
#include <math.h>
#include <stdint.h>
#include <cmocka.h>
static void test_audio_buffer_new(void **state)

View File

@ -37,6 +37,7 @@
#include <stddef.h>
#include <setjmp.h>
#include <math.h>
#include <stdint.h>
#include <cmocka.h>
static void test_audio_buffer_write_fill_10_bytes_and_write_5(void **state)

View File

@ -37,6 +37,7 @@
#include <stddef.h>
#include <setjmp.h>
#include <math.h>
#include <stdint.h>
#include <cmocka.h>
static void test_audio_buffer_write_10_bytes_out_of_256_and_read_back

View File

@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/sof.h>

View File

@ -33,8 +33,8 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdint.h>
#include <cmocka.h>
#include <stddef.h>
#include <sof/sof.h>

View File

@ -1,6 +1,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/alloc.h>

View File

@ -32,6 +32,7 @@
#include <stddef.h>
#include <math.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/list.h>

View File

@ -31,6 +31,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/alloc.h>

View File

@ -31,6 +31,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/audio/component.h>
#include "selector.h"

View File

@ -31,6 +31,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/audio/component.h>
#include "volume.h"

View File

@ -33,6 +33,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/preproc.h>
@ -70,7 +71,7 @@ static void test_debugability_macros_declare_log_entry(void **state)
"(6 << 24)"
"1"
"1"
"53"
"54"
"sizeof(\"" __FILE__ "\")"
"sizeof(\"Message\")"
"\"" __FILE__ "\""

View File

@ -32,6 +32,7 @@
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_lib_lib_rstrcmp_for_a_and_a_equals_0(void **state)

View File

@ -32,6 +32,7 @@
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_lib_lib_rstrlen_for_empty_str_equals_0(void **state)

View File

@ -31,6 +31,7 @@
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <test_group_generator.h>

View File

@ -33,6 +33,7 @@
#include <sof/alloc.h>
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/preproc.h>

View File

@ -33,6 +33,7 @@
#include <sof/alloc.h>
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/preproc.h>

View File

@ -32,6 +32,7 @@
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/preproc.h>

View File

@ -32,6 +32,7 @@
#include <sof/alloc.h>
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/preproc.h>

View File

@ -33,6 +33,7 @@
#include <sof/alloc.h>
#include <stdarg.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
#include <sof/preproc.h>

View File

@ -33,6 +33,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_list_list_init_prev_equal_to_root(void **state)

View File

@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_list_list_is_empty_when_empty_then_true(void **state)

View File

@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
struct test_list_container {

View File

@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
struct test_data {

View File

@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
struct test_data {

View File

@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
struct test_data {

View File

@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
struct test_data {

View File

@ -35,6 +35,7 @@
#include <stddef.h>
#include <setjmp.h>
#include <math.h>
#include <stdint.h>
#include <cmocka.h>
static void test_math_numbers_ceil_divide(void **state)

View File

@ -33,6 +33,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_math_numbers_find_equal_int16_for_5_123_5_10_123_500_123_n_123_equals_1_4_and_6

View File

@ -33,6 +33,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_math_numbers_find_max_abs_int32_for_neg100_99_98_50_equals_100

View File

@ -33,6 +33,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_math_numbers_find_min_int16_for_2_equals_2(void **state)

View File

@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_math_numbers_gcd_for_5083_and_391_equals_391(void **state)

View File

@ -33,6 +33,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
static void test_math_numbers_norm_int32_for_0_equals_31(void **state)