Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unit Testing

6 views
Skip to first unread message

Robert Hicks

unread,
Nov 1, 2005, 9:03:28 AM11/1/05
to
Since tclunit was just announced I was wondering what resources there
are for someone wanting to get up to speed on testing with Tcl?

Robert

suchenwi

unread,
Nov 1, 2005, 11:38:12 AM11/1/05
to
tclunit is just a GUI for tcltest. Tcl has a long tradition of testing
(and is used for such e.g. in DejaGnu).
But apart of highly-engineered testing frameworks, I often like the
simplicity of
proc e.g. {cmd -> expected} {
catch {uplevel 1 $cmd} res
if {$res ne $expected} {
puts "$cmd -> $res, expected $expected"
}
}
e.g. {expr 6*7} -> 42

Bryan Oakley

unread,
Nov 1, 2005, 11:46:38 AM11/1/05
to

That's a rather amusing little testing harness. Testing doesn't get much
simpler than that.

suchenwi

unread,
Nov 1, 2005, 3:25:17 PM11/1/05
to
I like underengineering - "do the simplest thing that might possibly
work" ...

Ray

unread,
Nov 1, 2005, 5:41:07 PM11/1/05
to
This definitely breaks the long-standing rule of "Why make anything
simple when it can be made wonderful and complex?"

Kaitzschu

unread,
Nov 1, 2005, 6:01:37 PM11/1/05
to
On Wed, 1 Nov 2005, Ray wrote:

> This definitely breaks the long-standing rule of "Why make anything
> simple when it can be made wonderful and complex?"

Because it isn't Perl.

--
-Kaitzschu
s="TCL ";while true;do echo -en "\r$s";s=${s:1:${#s}}${s:0:1};sleep .1;done

0 new messages