2019-05-07 23:27:12 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Facebook
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2019-05-08 04:36:56 +08:00
|
|
|
/* Test the normal version of the math_extras.h functions */
|
|
|
|
#define VNAME(N) test_##N
|
|
|
|
#include "tests.inc"
|
2019-05-07 23:27:12 +08:00
|
|
|
|
2019-05-08 04:36:56 +08:00
|
|
|
extern void test_portable_math_extras(void);
|
2019-05-07 23:27:12 +08:00
|
|
|
|
|
|
|
void test_main(void)
|
|
|
|
{
|
|
|
|
/* clang-format off */
|
|
|
|
ztest_test_suite(test_math_extras,
|
|
|
|
ztest_unit_test(test_u32_add),
|
|
|
|
ztest_unit_test(test_u32_mul),
|
|
|
|
ztest_unit_test(test_u64_add),
|
|
|
|
ztest_unit_test(test_u64_mul),
|
|
|
|
ztest_unit_test(test_size_add),
|
|
|
|
ztest_unit_test(test_size_mul),
|
|
|
|
ztest_unit_test(test_u32_clz),
|
|
|
|
ztest_unit_test(test_u64_clz),
|
|
|
|
ztest_unit_test(test_u32_ctz),
|
|
|
|
ztest_unit_test(test_u64_ctz));
|
|
|
|
ztest_run_test_suite(test_math_extras);
|
|
|
|
/* clang-format on */
|
2019-05-08 04:36:56 +08:00
|
|
|
|
|
|
|
test_portable_math_extras();
|
2019-05-07 23:27:12 +08:00
|
|
|
}
|