From: Patrick May Date: 2008-01-30T21:49:56+09:00 Subject: Re: assert{ 2.0 } - a new kind of assertion Phlip writes: > I have invented a new concept of developer test assertions. This > post is a preview of its features, before I release it for > Ruby. Porting it to other languages is left as an exercise for the > reader. > > assert{ 2.0 } > > I don't like the simple assertions - assert_equal, assert_match, > assert_not_nil, etc, in my developer tests. They only exist for one > reason - to print out their values when they fail. And then they > don't even reflect their variable names, either. > > So I wrote an assertion to replace them. Put whatever you want into > it; it prints out your expression, and all its values. You mean like you can easily do in Common Lisp: http://www.gigamonkeys.com/book/practical-building-a-unit-test-framework.html It's nice to see people making the effort to bring these primitive languages into the brave new world of the late 1950s and early 1960s. ;-) Ha, ha, only serious, Patrick ------------------------------------------------------------------------ S P Engineering, Inc. | Large scale, mission-critical, distributed OO | systems design and implementation. pjm@spe.com | (C++, Java, Common Lisp, Jini, middleware, SOA)