#include /* tests for AP_Common/sorting.cpp */ #include #include #include #if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX typedef int (*compare_fn_t)(const void*, const void*); static int comp16(const uint16_t *v1, const uint16_t *v2) { return int32_t(*v1) - int32_t(*v2); } static void check_equal(const uint16_t *a1, const uint16_t *a2, uint16_t n) { for (uint8_t j=0; j