• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- Unittests for cprojf ----------------------------------------------===//
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "CprojTest.h"
10 
11 #include "src/complex/cprojf.h"
12 
13 #include "utils/MPCWrapper/MPCUtils.h"
14 
15 using LlvmLibcCprojTestMPC = LIBC_NAMESPACE::testing::FPTest<float>;
16 
17 namespace mpc = LIBC_NAMESPACE::testing::mpc;
18 
TEST_F(LlvmLibcCprojTestMPC,MPCRND)19 TEST_F(LlvmLibcCprojTestMPC, MPCRND) {
20   _Complex float test = 5.0 + 10.0i;
21   EXPECT_MPC_MATCH_ALL_ROUNDING(mpc::Operation::Cproj, test,
22                                 LIBC_NAMESPACE::cprojf(test), 0.5);
23 }
24 
25 LIST_CPROJ_TESTS(_Complex float, float, LIBC_NAMESPACE::cprojf)
26