xref: /llvm-project/libc/test/include/complex_test.cpp (revision 1dbc98294adc06e409b1e0d44252826857ac2ec6)
1f4ba6a65SShourya Goel //===-- Unittests for complex ---------------------------------------------===//
2f4ba6a65SShourya Goel //
3f4ba6a65SShourya Goel // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4f4ba6a65SShourya Goel // See https://llvm.org/LICENSE.txt for license information.
5*1dbc9829SRoland McGrath // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6f4ba6a65SShourya Goel //
7f4ba6a65SShourya Goel //===----------------------------------------------------------------------===//
8f4ba6a65SShourya Goel 
9f4ba6a65SShourya Goel #include "include/llvm-libc-macros/complex-macros.h"
10f4ba6a65SShourya Goel #include "test/UnitTest/FPMatcher.h"
11f4ba6a65SShourya Goel #include "test/UnitTest/Test.h"
12f4ba6a65SShourya Goel 
13f4ba6a65SShourya Goel TEST(LlvmLibcComplexTest, VersionMacro) {
14f4ba6a65SShourya Goel   EXPECT_EQ(__STDC_VERSION_COMPLEX_H__, 202311L);
15f4ba6a65SShourya Goel }
16f4ba6a65SShourya Goel 
17f4ba6a65SShourya Goel TEST(LlvmLibcComplexTest, IMacro) { EXPECT_CFP_EQ(1.0fi, I); }
18f4ba6a65SShourya Goel 
19f4ba6a65SShourya Goel TEST(LlvmLibcComplexTest, _Complex_IMacro) { EXPECT_CFP_EQ(1.0fi, _Complex_I); }
20