1 //===-- Unittests for complex ---------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "include/llvm-libc-macros/complex-macros.h"
10 #include "test/UnitTest/FPMatcher.h"
11 #include "test/UnitTest/Test.h"
13 TEST(LlvmLibcComplexTest
, VersionMacro
) {
14 EXPECT_EQ(__STDC_VERSION_COMPLEX_H__
, 202311L);
17 TEST(LlvmLibcComplexTest
, IMacro
) { EXPECT_CFP_EQ(1.0fi
, I
); }
19 TEST(LlvmLibcComplexTest
, _Complex_IMacro
) { EXPECT_CFP_EQ(1.0fi
, _Complex_I
); }