mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Backported regression test changes from HEAD so the buildfarm hopefully gets green again.
This commit is contained in:
parent
b8dd3a8604
commit
33623b51b6
@ -108,9 +108,14 @@ main(void)
|
|||||||
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
|
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i != 6)
|
||||||
|
{
|
||||||
|
/* underflow does not work reliable on several archs, so not testing it here */
|
||||||
|
/* this is a libc problem since we only call strtod() */
|
||||||
r = dectodbl(dec, &dbl);
|
r = dectodbl(dec, &dbl);
|
||||||
if (r) check_errno();
|
if (r) check_errno();
|
||||||
printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
|
printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
|
||||||
|
}
|
||||||
|
|
||||||
PGTYPESdecimal_free(din);
|
PGTYPESdecimal_free(din);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -69,7 +69,6 @@ dec[6,6]: 0 (r: 0)
|
|||||||
dec[6,7]: 0.00 (r: 0 - cmp: 1)
|
dec[6,7]: 0.00 (r: 0 - cmp: 1)
|
||||||
dec[6,8]: 0 (r: 0)
|
dec[6,8]: 0 (r: 0)
|
||||||
dec[6,9]: 0.00 (r: 0 - cmp: 1)
|
dec[6,9]: 0.00 (r: 0 - cmp: 1)
|
||||||
(errno == PGTYPES_NUM_UNDERFLOW) - dec[6,10]: 0 (r: -1)
|
|
||||||
|
|
||||||
dec[7,1]: r: 0, 0.001
|
dec[7,1]: r: 0, 0.001
|
||||||
dec[7,2]: r: 0, 0
|
dec[7,2]: r: 0, 0
|
||||||
|
@ -128,9 +128,14 @@ main(void)
|
|||||||
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
|
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i != 6)
|
||||||
|
{
|
||||||
|
/* underflow does not work reliable on several archs, so not testing it here */
|
||||||
|
/* this is a libc problem since we only call strtod() */
|
||||||
r = dectodbl(dec, &dbl);
|
r = dectodbl(dec, &dbl);
|
||||||
if (r) check_errno();
|
if (r) check_errno();
|
||||||
printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
|
printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
|
||||||
|
}
|
||||||
|
|
||||||
PGTYPESdecimal_free(din);
|
PGTYPESdecimal_free(din);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -69,7 +69,6 @@ dec[6,6]: 0 (r: 0)
|
|||||||
dec[6,7]: 0.00 (r: 0 - cmp: 1)
|
dec[6,7]: 0.00 (r: 0 - cmp: 1)
|
||||||
dec[6,8]: 0 (r: 0)
|
dec[6,8]: 0 (r: 0)
|
||||||
dec[6,9]: 0.00 (r: 0 - cmp: 1)
|
dec[6,9]: 0.00 (r: 0 - cmp: 1)
|
||||||
(errno == PGTYPES_NUM_UNDERFLOW) - dec[6,10]: 0 (r: -1)
|
|
||||||
|
|
||||||
dec[7,1]: r: 0, 0.001
|
dec[7,1]: r: 0, 0.001
|
||||||
dec[7,2]: r: 0, 0
|
dec[7,2]: r: 0, 0
|
||||||
|
@ -88,7 +88,6 @@ num[6,6]: 0 (r: 0)
|
|||||||
num[6,7]: 0.00 (r: 0 - cmp: 1)
|
num[6,7]: 0.00 (r: 0 - cmp: 1)
|
||||||
num[6,8]: 0 (r: 0)
|
num[6,8]: 0 (r: 0)
|
||||||
num[6,9]: 0.00 (r: 0 - cmp: 1)
|
num[6,9]: 0.00 (r: 0 - cmp: 1)
|
||||||
(errno == PGTYPES_NUM_UNDERFLOW) - num[6,10]: 0 (r: -1)
|
|
||||||
num[6,11]: - (r: 0)
|
num[6,11]: - (r: 0)
|
||||||
num[6,12]: 0.00 (r: 0 - cmp: 0)
|
num[6,12]: 0.00 (r: 0 - cmp: 0)
|
||||||
|
|
||||||
|
@ -119,9 +119,16 @@ main(void)
|
|||||||
free(text);
|
free(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i != 6)
|
||||||
|
{
|
||||||
|
/* underflow does not work reliable on several archs, so not testing it here */
|
||||||
|
/* this is a libc problem since we only call strtod() */
|
||||||
|
|
||||||
r = PGTYPESnumeric_to_double(num, &d);
|
r = PGTYPESnumeric_to_double(num, &d);
|
||||||
if (r) check_errno();
|
if (r) check_errno();
|
||||||
printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
|
printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
|
||||||
|
}
|
||||||
|
|
||||||
/* do not test double to numeric because
|
/* do not test double to numeric because
|
||||||
* - extra digits are different on different architectures
|
* - extra digits are different on different architectures
|
||||||
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
|
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
|
||||||
|
@ -88,7 +88,6 @@ num[6,6]: 0 (r: 0)
|
|||||||
num[6,7]: 0.00 (r: 0 - cmp: 1)
|
num[6,7]: 0.00 (r: 0 - cmp: 1)
|
||||||
num[6,8]: 0 (r: 0)
|
num[6,8]: 0 (r: 0)
|
||||||
num[6,9]: 0.00 (r: 0 - cmp: 1)
|
num[6,9]: 0.00 (r: 0 - cmp: 1)
|
||||||
(errno == PGTYPES_NUM_UNDERFLOW) - num[6,10]: 0 (r: -1)
|
|
||||||
num[6,11]: - (r: 0)
|
num[6,11]: - (r: 0)
|
||||||
num[6,12]: 0.00 (r: 0 - cmp: 0)
|
num[6,12]: 0.00 (r: 0 - cmp: 0)
|
||||||
|
|
||||||
|
@ -101,9 +101,16 @@ main(void)
|
|||||||
free(text);
|
free(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i != 6)
|
||||||
|
{
|
||||||
|
/* underflow does not work reliable on several archs, so not testing it here */
|
||||||
|
/* this is a libc problem since we only call strtod() */
|
||||||
|
|
||||||
r = PGTYPESnumeric_to_double(num, &d);
|
r = PGTYPESnumeric_to_double(num, &d);
|
||||||
if (r) check_errno();
|
if (r) check_errno();
|
||||||
printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
|
printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
|
||||||
|
}
|
||||||
|
|
||||||
/* do not test double to numeric because
|
/* do not test double to numeric because
|
||||||
* - extra digits are different on different architectures
|
* - extra digits are different on different architectures
|
||||||
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
|
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
|
||||||
|
Loading…
x
Reference in New Issue
Block a user