From 12c5843d2154a3bc6b954aeb7a4225d9f661de32 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Wed, 30 Nov 2011 21:03:35 +0000 Subject: [PATCH] [MSVCRT_APITEST] Add more tests svn path=/trunk/; revision=54550 --- rostests/apitests/msvcrt/ieee.c | 549 ++++++++++++++++++++++++++++++++ 1 file changed, 549 insertions(+) diff --git a/rostests/apitests/msvcrt/ieee.c b/rostests/apitests/msvcrt/ieee.c index ffaf13ab47d..9bc952e066b 100644 --- a/rostests/apitests/msvcrt/ieee.c +++ b/rostests/apitests/msvcrt/ieee.c @@ -7,6 +7,7 @@ #include #include +#include typedef union { @@ -199,6 +200,278 @@ void test_isnan(void) ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); } +void test_j0(void) +{ + ieee_double tested; + ieee_double expected; + ieee_double result; + + expected.l = 0; + + errno = 0xDEADBEEF; + tested.l = 0xFFFFFFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF7FFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFEFFFFFFFFFFFFFLL; + expected.l = 0x1FE7206E1D6FDCFALL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8010000000000000LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x800FFFFFFFFFFFFFLL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000001LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000000LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000000LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000001LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x000FFFFFFFFFFFFFLL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0010000000000000LL; + expected.l = 0x3FF0000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FEFFFFFFFFFFFFFLL; + expected.l = 0x1FE7206E1D6FDCFALL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000001LL; + expected.l = 0x7FF8000000000001LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF7FFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF8000000000000LL; + expected.l = 0x7FF8000000000000LL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FFFFFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _j0(tested.d); + ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); +} + +void test_j1(void) +{ + ieee_double tested; + ieee_double expected; + ieee_double result; + + expected.l = 0; + + errno = 0xDEADBEEF; + tested.l = 0xFFFFFFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF7FFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFEFFFFFFFFFFFFFLL; + expected.l = 0x9FE7206E1D6FDCFALL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8010000000000000LL; + expected.l = 0x8008000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x800FFFFFFFFFFFFFLL; + expected.l = 0x8008000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000001LL; + expected.l = 0x8000000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000000LL; + expected.l = 0x8000000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000000LL; + expected.l = 0x0000000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000001LL; + expected.l = 0x0000000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x000FFFFFFFFFFFFFLL; + expected.l = 0x0008000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0010000000000000LL; + expected.l = 0x0008000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FEFFFFFFFFFFFFFLL; + expected.l = 0x1FE7206E1D6FDCFALL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000001LL; + expected.l = 0x7FF8000000000001LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF7FFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF8000000000000LL; + expected.l = 0x7FF8000000000000LL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FFFFFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _j1(tested.d); + ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); +} + void test_scalb(void) { ieee_double tested; @@ -335,10 +608,286 @@ void test_scalb(void) ok(errno == EDOM, "errno: %d\n", errno); } +void test_y0(void) +{ + ieee_double tested; + ieee_double expected; + ieee_double result; + + expected.l = 0; + + errno = 0xDEADBEEF; + tested.l = 0xFFFFFFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF7FFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFEFFFFFFFFFFFFFLL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8010000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x800FFFFFFFFFFFFFLL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000001LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000000LL; + expected.l = 0xFFF0000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == ERANGE, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000000LL; + expected.l = 0xFFF0000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == ERANGE, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000001LL; + expected.l = 0xC07D9FFC3469E1B3LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x000FFFFFFFFFFFFFLL; + expected.l = 0xC07C30D8F820740ELL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0010000000000000LL; + expected.l = 0xC07C30D8F820740ELL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FEFFFFFFFFFFFFFLL; + expected.l = 0x9FD5A36F8428F58BLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000001LL; + expected.l = 0x7FF8000000000001LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF7FFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF8000000000000LL; + expected.l = 0x7FF8000000000000LL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FFFFFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _y0(tested.d); + ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); +} + +void test_y1(void) +{ + ieee_double tested; + ieee_double expected; + ieee_double result; + + expected.l = 0; + + errno = 0xDEADBEEF; + tested.l = 0xFFFFFFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF8000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF7FFFFFFFFFFFFLL; + expected.l = 0xFFFFFFFFFFFFFFFFLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000001LL; + expected.l = 0xFFF8000000000001LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0xFFEFFFFFFFFFFFFFLL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8010000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x800FFFFFFFFFFFFFLL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000001LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x8000000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == ERANGE, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == ERANGE, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0000000000000001LL; + expected.l = 0xFFF0000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x000FFFFFFFFFFFFFLL; + expected.l = 0xFFC45F306DC9C884LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x0010000000000000LL; + expected.l = 0xFFC45F306DC9C883LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FEFFFFFFFFFFFFFLL; + expected.l = 0x9FD5A36F8428F58BLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == 0xDEADBEEF, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000000LL; + expected.l = 0xFFF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF0000000000001LL; + expected.l = 0x7FF8000000000001LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF7FFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FF8000000000000LL; + expected.l = 0x7FF8000000000000LL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); + errno = 0xDEADBEEF; + tested.l = 0x7FFFFFFFFFFFFFFFLL; + expected.l = 0x7FFFFFFFFFFFFFFFLL; + result.d = _y1(tested.d); + ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); + ok(errno == EDOM, "errno: %d\n", errno); +} + START_TEST(ieee) { test_finite(); test_fpclass(); test_isnan(); + test_j0(); + test_j1(); test_scalb(); + test_y0(); + test_y1(); }