From: "chris.danx" <spamoff.danx@ntlworld.com>
Subject: Re: Suggestion for gnatstub
Date: Fri, 08 Nov 2002 21:09:39 +0000
Date: 2002-11-08T21:09:39+00:00 [thread overview]
Message-ID: <yLVy9.2374$Nm5.91281@newsfep1-gui.server.ntli.net> (raw)
In-Reply-To: <3dcb9e51$0$303$bed64819@news.gradwell.net>
Marin David Condic wrote:
> Actually, I dislike gnatstub because it doesn't generate null
> functions. I often want the stubs to be executable so I can test
> higher level code and do iterative builds. ("O.K. I got *this*
> function working right, now lets go build the next one..." Saves on
> having to build test harnesses.) I'd imagine it would be fairly
> straightforward to include an option that let the user select the
> desired behavior - raise exceptions or generate working code.
I'd also like to see some revisions to gnatstub like this. Something
that smartly creates stub functions that work when possible. I'm wrote
quite a few packages over the summer and wanted to try out an iterative
development style tought in our software development course (to test it
out... :) ). The package spec would be written, then a stub generated,
then a higher level module coded and tested. The stub would then be
replaced with the correct code, tested with the aid of the higher level
(coordinate) module plus some extra code. The scheme worked well, but I
found that gnatstub was not all that useful, because it generated
function bodies that needed recoding to be stubs.
I would also like it to put the comments from the spec, which could be
controlled by a flag. Also the ability to specify a test code function
(and location) that it could use to generate code of the form
procedure make_type (xx : in yy) is
begin
some_log_routine ("make_type called with value", xx);
end make_type;
or something like that. Even if it just put the name of the procedure
being called to the log routine it would cut down a heck of a lot of
work. This strategy is what I use to write code now (atleast in Ada).
I take a problem, write a spec, generate a stub (usually by hand) and
then write the test code. Finally, the code for the implementation is
filled in and tested incrementally. It is very effective and I would
benefit greatly from a smarter gnatstub (sadly I have no time to modify
or redesign it, too much bloody work!).
Chris
--
for personal replies change spamoff to chris
next prev parent reply other threads:[~2002-11-08 21:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-08 11:14 Suggestion for gnatstub Victor Porton
2002-11-08 12:56 ` Marc A. Criley
2002-11-08 13:23 ` Marin David Condic
2002-11-08 21:09 ` chris.danx [this message]
2002-11-15 17:08 ` Wes Groleau
2002-11-15 17:35 ` Stephen Leake
2002-11-16 14:36 ` Marin David Condic
2002-11-09 14:15 ` Simon Wright
2002-11-09 14:50 ` Marin David Condic
2002-11-09 20:05 ` Simon Wright
2002-11-10 15:58 ` Marin David Condic
2002-11-10 20:31 ` Robert A Duff
2002-11-11 13:46 ` Marin David Condic
2002-11-11 15:31 ` Robert A Duff
2002-11-11 20:32 ` Randy Brukardt
2002-11-11 6:31 ` Simon Wright
2002-11-09 15:44 ` Robert A Duff
2002-11-09 20:08 ` Simon Wright
2002-11-09 21:56 ` Robert A Duff
2002-11-10 8:42 ` Pascal Obry
2002-11-10 12:20 ` Simon Wright
2002-11-10 16:04 ` Marin David Condic
2002-11-14 20:10 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox