From 65b3fba38d796044364738f6e154679321c48ab9 Mon Sep 17 00:00:00 2001 From: zehata Date: Thu, 6 Dec 2018 07:02:39 +0800 Subject: Added POSIX Compliance Test for complex.h, and adding lines to define CYGWIN until complex.h is fixed (Ticket 3635) . (GCI 2018) --- testsuites/psxtests/psxhdrs/complex/ctanl.c | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 testsuites/psxtests/psxhdrs/complex/ctanl.c (limited to 'testsuites/psxtests/psxhdrs/complex/ctanl.c') diff --git a/testsuites/psxtests/psxhdrs/complex/ctanl.c b/testsuites/psxtests/psxhdrs/complex/ctanl.c new file mode 100644 index 0000000000..9c0adbc3ca --- /dev/null +++ b/testsuites/psxtests/psxhdrs/complex/ctanl.c @@ -0,0 +1,39 @@ +/** + * @file + * @brief ctanl() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Zenon (zehata). + * + * Permission to use, copy, modify, and/or distribute this software + * for any purpose with or without fee is hereby granted. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR + * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define __CYGWIN__ 1 /* required until ticker 3635 fixed */ +#include + +int test(void); + +int test(void) +{ + long double complex number; + long double complex result; + + number = 1.0 + 1.0 * I; + result = ctanl(number); + return (result != 0); +} -- cgit v1.2.3