1 /*
2 * Copyright (c) 2019 Facebook
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 /* Test the portable version of the math_extras.h functions */
8 #define PORTABLE_MISC_MATH_EXTRAS 1
9 #define VNAME(N) test_portable_##N
10 #include "tests.inc"
11
ZTEST(math_extras_portable,test_portable_u32_add)12 ZTEST(math_extras_portable, test_portable_u32_add) {
13 run_portable_u32_add();
14 }
15
ZTEST(math_extras_portable,test_portable_u32_mul)16 ZTEST(math_extras_portable, test_portable_u32_mul) {
17 run_portable_u32_mul();
18 }
19
ZTEST(math_extras_portable,test_portable_u64_add)20 ZTEST(math_extras_portable, test_portable_u64_add) {
21 run_portable_u64_add();
22 }
23
ZTEST(math_extras_portable,test_portable_u64_mul)24 ZTEST(math_extras_portable, test_portable_u64_mul) {
25 run_portable_u64_mul();
26 }
27
ZTEST(math_extras_portable,test_portable_size_add)28 ZTEST(math_extras_portable, test_portable_size_add) {
29 run_portable_size_add();
30 }
31
ZTEST(math_extras_portable,test_portable_size_mul)32 ZTEST(math_extras_portable, test_portable_size_mul) {
33 run_portable_size_mul();
34 }
35
ZTEST(math_extras_portable,test_portable_u32_clz)36 ZTEST(math_extras_portable, test_portable_u32_clz) {
37 run_portable_u32_clz();
38 }
39
ZTEST(math_extras_portable,test_portable_u64_clz)40 ZTEST(math_extras_portable, test_portable_u64_clz) {
41 run_portable_u64_clz();
42 }
43
ZTEST(math_extras_portable,test_portable_u32_ctz)44 ZTEST(math_extras_portable, test_portable_u32_ctz) {
45 run_portable_u32_ctz();
46 }
47
ZTEST(math_extras_portable,test_portable_u64_ctz)48 ZTEST(math_extras_portable, test_portable_u64_ctz) {
49 run_portable_u64_ctz();
50 }
51
52 ZTEST_SUITE(math_extras_portable, NULL, NULL, NULL, NULL, NULL);
53