chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Re: Integrating unit tests into source code


From: Thomas Christian Chust
Subject: Re: [Chicken-users] Re: Integrating unit tests into source code
Date: Fri, 15 Dec 2006 12:55:10 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-AT; rv:1.8.0.8) Gecko/20061030 SeaMonkey/1.0.6

Brandon J. Van Every wrote:

> [...] I don't oppose contract
> programming.  I'm generally in favor of any testing method, good
> comments, and things that resemble literate programming.  However, I
> think there are probably limits to what contract programming can do for
> people, so I'm not inclined to oversell it.  It would be one heckuva
> specification language that could handle any arbitrary problem domain,
> with clarity and aplomb. [...]

Hello,

all the contract based programming systems I know don't come up with a
specific language for describing the contracts. I usually see contract
based programming systems as syntactic sugar allowing you to specify
arbitrary code which will be run upon entry to and exit from a function.
Of course it makes most sense to put parameter and return value checking
 assertions into those blocks, not something with strange side effects
or the like, because all the contract blocks are usually automatically
removed in the release build.

In contrary to unit tests, I find contracts very useful not only to
debug library code, but also code using a library. But contracts don't
replace tests.

Like Felix said earlier in this thread, I would as well vote for a
general code annotation system that could be used to implement both
contracts and unit tests in CHICKEN.

cu,
Thomas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]