From da2621649ca002941c77295402b9052e128487ad Mon Sep 17 00:00:00 2001 From: ABR290B Date: Thu, 6 Dec 2018 16:46:25 +0530 Subject: POSIX Signature Test for fenv.h (GCI 2018) Updates #2971. --- testsuites/psxtests/psxhdrs/fenv/feclearexcept.c | 34 +++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/fegetenv.c | 34 +++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c | 35 ++++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/fegetround.c | 33 ++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/feholdexcept.c | 34 +++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c | 34 +++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/fesetenv.c | 34 +++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c | 35 ++++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/fesetround.c | 34 +++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/fetestexcept.c | 34 +++++++++++++++++++++ testsuites/psxtests/psxhdrs/fenv/feupdateenv.c | 34 +++++++++++++++++++++ 11 files changed, 375 insertions(+) create mode 100644 testsuites/psxtests/psxhdrs/fenv/feclearexcept.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/fegetenv.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/fegetround.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/feholdexcept.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/fesetenv.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/fesetround.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/fetestexcept.c create mode 100644 testsuites/psxtests/psxhdrs/fenv/feupdateenv.c (limited to 'testsuites/psxtests/psxhdrs') diff --git a/testsuites/psxtests/psxhdrs/fenv/feclearexcept.c b/testsuites/psxtests/psxhdrs/fenv/feclearexcept.c new file mode 100644 index 0000000000..0e2e6941f3 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/feclearexcept.c @@ -0,0 +1,34 @@ +/** + * @file + * @brief feclearexcept() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + int b = 0; + return feclearexcept(b); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/fenv/fegetenv.c b/testsuites/psxtests/psxhdrs/fenv/fegetenv.c new file mode 100644 index 0000000000..8341cd3076 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/fegetenv.c @@ -0,0 +1,34 @@ +/** + * @file + * @brief fegetenv() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + fenv_t a; + return fegetenv(&a); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c b/testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c new file mode 100644 index 0000000000..7d99378368 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/fegetexceptflag.c @@ -0,0 +1,35 @@ +/** + * @file + * @brief fegetexceptflag() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + int a = 1; + fexcept_t b; + return fegetexceptflag(&b, a); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/fenv/fegetround.c b/testsuites/psxtests/psxhdrs/fenv/fegetround.c new file mode 100644 index 0000000000..189daa5cf8 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/fegetround.c @@ -0,0 +1,33 @@ +/** + * @file + * @brief fegetround() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + return fegetround(); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/fenv/feholdexcept.c b/testsuites/psxtests/psxhdrs/fenv/feholdexcept.c new file mode 100644 index 0000000000..9b395eeb81 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/feholdexcept.c @@ -0,0 +1,34 @@ +/** + * @file + * @brief feholfexcept() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + fenv_t a; + return feholdexcept(&a); +} diff --git a/testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c b/testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c new file mode 100644 index 0000000000..6098ea66c7 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/feraiseexcept.c @@ -0,0 +1,34 @@ +/** + * @file + * @brief feraiseexcept() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + int b = 0; + return feraiseexcept(b); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/fenv/fesetenv.c b/testsuites/psxtests/psxhdrs/fenv/fesetenv.c new file mode 100644 index 0000000000..46cf2469f1 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/fesetenv.c @@ -0,0 +1,34 @@ +/** + * @file + * @brief fesetenv() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + fenv_t a; + return fegetenv(&a); +} diff --git a/testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c b/testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c new file mode 100644 index 0000000000..e938e177e8 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/fesetexceptflag.c @@ -0,0 +1,35 @@ +/** + * @file + * @brief fesetexceptflag() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + int a = 0; + const fexcept_t b; + return fesetexceptflag(&b, a); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/fenv/fesetround.c b/testsuites/psxtests/psxhdrs/fenv/fesetround.c new file mode 100644 index 0000000000..2bc5a4b9cf --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/fesetround.c @@ -0,0 +1,34 @@ +/** + * @file + * @brief fesetround() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + int b = 0; + return fesetround(b); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/fenv/fetestexcept.c b/testsuites/psxtests/psxhdrs/fenv/fetestexcept.c new file mode 100644 index 0000000000..e6990d9e10 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/fetestexcept.c @@ -0,0 +1,34 @@ +/** + * @file + * @brief fetestexcept() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + int b = 0; + return fetestexcept(b); +} \ No newline at end of file diff --git a/testsuites/psxtests/psxhdrs/fenv/feupdateenv.c b/testsuites/psxtests/psxhdrs/fenv/feupdateenv.c new file mode 100644 index 0000000000..0136cca3fc --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fenv/feupdateenv.c @@ -0,0 +1,34 @@ +/** + * @file + * @brief feupdateenv() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Abhimanyu Raghuvanshi + * + * 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 + +#include + +int test(void); + +int test(void) +{ + const fenv_t a; + return feupdateenv(&a); +} \ No newline at end of file -- cgit v1.2.3