* gdb.base/dfp-exprs.exp (test_dfp_arithmetic_expressions): Add tests

for expressions with decimal float values.
	(test_dfp_conversions): New function to test casts to and from
	decimal float types.
	Call test_dfp_conversions.
	* gdb.base/dfp-test.c (struct decstruct): Add float4 and double8
	elements.
	(main): Initialize ds.float4 and ds.double8 elements.
	* gdb.base/dfp-test.exp (d32_set_tests): Fix typo.  Adjust expect
	string to new error message.
	(d64_set_tests): Likewise.
	(d128_set_tests): Likewise.
	Add tests for expressions with decimal float variables.  Add tests for
	conversions to and from decimal float types.
This commit is contained in:
Thiago Jung Bauermann
2008-01-07 22:34:49 +00:00
parent 4ef30785ea
commit f6867ce08c
4 changed files with 230 additions and 38 deletions

View File

@@ -26,6 +26,8 @@ struct decstruct
{
int int4;
long long8;
float float4;
double double8;
_Decimal32 dec32;
_Decimal64 dec64;
_Decimal128 dec128;
@@ -85,6 +87,8 @@ int main()
ds.int4 = 1;
ds.long8 = 2;
ds.float4 = 3.1;
ds.double8 = 4.2;
ds.dec32 = 1.2345df;
ds.dec64 = 1.2345dd;
ds.dec128 = 1.2345dl;