This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH v2 3/8] Add self-test framework to gdb
- From: Doug Evans <dje at google dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 29 Apr 2016 10:28:43 -0700
- Subject: Re: [PATCH v2 3/8] Add self-test framework to gdb
- Authentication-results: sourceware.org; auth=none
- References: <1461789279-15996-1-git-send-email-tom at tromey dot com> <1461789279-15996-4-git-send-email-tom at tromey dot com> <86wpnido3w dot fsf at gmail dot com> <877ffgbg8h dot fsf at tromey dot com> <868tzwe8n7 dot fsf at gmail dot com>
On Fri, Apr 29, 2016 at 8:29 AM, Yao Qi <email@example.com> wrote:
> Tom Tromey <firstname.lastname@example.org> writes:
>> It would also be possible to use exceptions rather than asserts.
>> Then the current single command could be kept, since gdb wouldn't abort
>> on failure.
>> Let me know which you'd prefer.
> Using exceptions is fine to me.
On a separate note, where do we, in the long term, want tests to live?
I'm wondering about the scalability of having tests in the same source file
reducing the readability, and whether we want conventions to avoid this.
I'm not saying 100% of tests have to, say, live in separate files
(e.g. foo.c tests -> foo-test.c or some such).
I'm just paranoid about having a repeat of the massive readability reduction
from the adding of record support to *-tdep.c files.
[Imagine how the sources will look 5 years from now.]