llvm/libc/test/UnitTest/FPMatcher.h

//===-- FPMatchers.h --------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TEST_UNITTEST_FPMATCHER_H
#define LLVM_LIBC_TEST_UNITTEST_FPMATCHER_H

#include "src/__support/CPP/array.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/fpbits_str.h"
#include "src/__support/macros/config.h"
#include "test/UnitTest/RoundingModeUtils.h"
#include "test/UnitTest/StringUtils.h"
#include "test/UnitTest/Test.h"

#include "hdr/math_macros.h"

namespace LIBC_NAMESPACE_DECL {
namespace testing {

template <typename T, TestCond Condition> class FPMatcher : public Matcher<T> {};

template <TestCond C, typename T> FPMatcher<T, C> getMatcher(T expectedValue) {}

template <typename T> struct FPTest : public Test {};

} // namespace testing
} // namespace LIBC_NAMESPACE_DECL

#define DECLARE_SPECIAL_CONSTANTS(T)

#define EXPECT_FP_EQ(expected, actual)

#define TEST_FP_EQ(expected, actual)

#define EXPECT_FP_IS_NAN(actual)

#define ASSERT_FP_EQ(expected, actual)

#define EXPECT_FP_NE(expected, actual)

#define ASSERT_FP_NE(expected, actual)

#define EXPECT_MATH_ERRNO(expected)

#define ASSERT_MATH_ERRNO(expected)

#define EXPECT_FP_EXCEPTION(expected)

#define ASSERT_FP_EXCEPTION(expected)

#define EXPECT_FP_EQ_WITH_EXCEPTION(expected_val, actual_val, expected_except)

#define EXPECT_FP_IS_NAN_WITH_EXCEPTION(actual_val, expected_except)

#define EXPECT_FP_EQ_ALL_ROUNDING(expected, actual)

#define EXPECT_FP_EQ_ROUNDING_MODE(expected, actual, rounding_mode)

#define EXPECT_FP_EQ_ROUNDING_NEAREST(expected, actual)

#define EXPECT_FP_EQ_ROUNDING_UPWARD(expected, actual)

#define EXPECT_FP_EQ_ROUNDING_DOWNWARD(expected, actual)

#define EXPECT_FP_EQ_ROUNDING_TOWARD_ZERO(expected, actual)

#define EXPECT_FP_EQ_WITH_EXCEPTION_ROUNDING_MODE(                             \
    expected, actual, expected_except, rounding_mode)

#define EXPECT_FP_EQ_WITH_EXCEPTION_ROUNDING_NEAREST(expected, actual,         \
                                                     expected_except)

#define EXPECT_FP_EQ_WITH_EXCEPTION_ROUNDING_UPWARD(expected, actual,          \
                                                    expected_except)

#define EXPECT_FP_EQ_WITH_EXCEPTION_ROUNDING_DOWNWARD(expected, actual,        \
                                                      expected_except)

#define EXPECT_FP_EQ_WITH_EXCEPTION_ROUNDING_TOWARD_ZERO(expected, actual,     \
                                                         expected_except)

#endif // LLVM_LIBC_TEST_UNITTEST_FPMATCHER_H