diff options
author | zehata <zenon.hans.taneka@dhs.sg> | 2018-12-06 07:02:39 +0800 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2018-12-05 22:20:36 -0600 |
commit | 65b3fba38d796044364738f6e154679321c48ab9 (patch) | |
tree | 100b4e919a77ecba3ecf5c4e2a7a040ea6cf6485 /testsuites/psxtests/psxhdrs/complex/ctanl.c | |
parent | psxhdrs: Add POSIX API Signature Compliance Tests for ftw.h (GCI 2018) (diff) | |
download | rtems-65b3fba38d796044364738f6e154679321c48ab9.tar.bz2 |
Added POSIX Compliance Test for complex.h, and adding lines to define CYGWIN until complex.h is fixed (Ticket 3635) . (GCI 2018)
Diffstat (limited to '')
-rw-r--r-- | testsuites/psxtests/psxhdrs/complex/ctanl.c | 39 |
1 files changed, 39 insertions, 0 deletions
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 <complex.h> + +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); +} |