This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Decimal Floating Point support for GDB (Part 2: testcase)
- From: Daniel Jacobowitz <drow at false dot org>
- To: Wu Zhou <woodzltc at cn dot ibm dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 2 Oct 2005 17:00:53 -0400
- Subject: Re: [RFC] Decimal Floating Point support for GDB (Part 2: testcase)
- References: <Pine.LNX.4.63.0509281256030.1231@linux.site>
On Wed, Sep 28, 2005 at 01:28:07PM +0800, Wu Zhou wrote:
> In this testcase, there are totally 83 tests. Most of them are about
> displaying and setting of dfp types, which are partitioned into
> three groups, one for each dfp types (_Decimal32, _Decimal64 and
> _Decimal128). In each group, we first begin with the printing of
> a normal finite dfp value, then Infinity and NaN. Then we call
> d32_set_tests (d64_set_tests or d128_set_tests) to test that GDB
> could handle the setting different values of variable d32 (d64 or
> d128).
>
> At the end of the testcase, we test that GDB could print out the dfp
> values correctly in the function arguments and backtrace.
Just a few comments on the tests:
- This should be at least two separate tests, since the "p 1.5df" tests
can be run without a GCC which supports DFP, even though dfp-test.c
can't be compiled.
- C files need to have copyright headers.
In this:
> + gdb_test "p d32=123.45df" "123.45df" "p d32=123.45df"
- The third argument to gdb_test defaults to the first argument, so you
don't need it.
- The second argument should be more specific. Something like
"\$${decimal} = 123.45df". I went to look at this test to see if my
understanding of the use of string types was right, and the matching
patterns were so loose I couldn't tell.
Otherwise I'll wait to look at this further until we're agreed on the
GDB support.
--
Daniel Jacobowitz
CodeSourcery, LLC