29 lines · c
1//===-- Utility class to test different flavors of scalbn -------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIBC_TEST_SRC_MATH_SCALBN_H10#define LLVM_LIBC_TEST_SRC_MATH_SCALBN_H11 12#include "LdExpTest.h"13#include "test/UnitTest/Test.h"14 15#define LIST_SCALBN_TESTS(T, func) \16 using LlvmLibcScalbnTest = LdExpTestTemplate<T>; \17 TEST_F(LlvmLibcScalbnTest, SpecialNumbers) { testSpecialNumbers(&func); } \18 TEST_F(LlvmLibcScalbnTest, PowersOfTwo) { testPowersOfTwo(&func); } \19 TEST_F(LlvmLibcScalbnTest, OverFlow) { testOverflow(&func); } \20 TEST_F(LlvmLibcScalbnTest, UnderflowToZeroOnNormal) { \21 testUnderflowToZeroOnNormal(&func); \22 } \23 TEST_F(LlvmLibcScalbnTest, UnderflowToZeroOnSubnormal) { \24 testUnderflowToZeroOnSubnormal(&func); \25 } \26 TEST_F(LlvmLibcScalbnTest, NormalOperation) { testNormalOperation(&func); }27 28#endif // LLVM_LIBC_TEST_SRC_MATH_SCALBN_H29