aboutsummaryrefslogtreecommitdiff
path: root/pl/math/include/pl_test.h
blob: 6a81360ba2873a8b4a32a243feb95db72a037e84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * PL macros to aid testing. This version of this file is used for building the
 * routine, not the tests. Separate definitions are found in test/pl_test.h
 * which emit test parameters.
 *
 * Copyright (c) 2022-2023, Arm Limited.
 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception.
 */

/* Emit max ULP threshold - silenced for building the routine.  */
#define PL_TEST_ULP(f, l)

/* Emit alias. The PL_TEST_ALIAS declaration is piggy-backed on top of
   strong_alias. Use PL_ALIAS instead of strong_alias to make sure the alias is
   also added to the test suite.  */
#define PL_ALIAS(a, b) strong_alias (a, b)

/* Emit routine name if e == 1 and f is expected to correctly trigger fenv
   exceptions. e allows declaration to be emitted conditionally upon certain
   build flags - defer expansion by one pass to allow those flags to be expanded
   properly.  */
#define PL_TEST_EXPECT_FENV(f, e)
#define PL_TEST_EXPECT_FENV_ALWAYS(f)

#define PL_TEST_INTERVAL(f, lo, hi, n)
#define PL_TEST_INTERVAL_C(f, lo, hi, n, c)