On Thu, May 6, 2010 at 12:39 PM, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
On 6 May 2010 19:32, Alan Ruttenberg <
alanruttenberg@gmail.com> wrote:
>> That doesn't, unfortunately, solve the concern Mark states above. What we'd like
>> to have is capability to say
>> Assert((5 + 6 + 7) == 18);
> well, having a look at the code, that wouldn't be that useful. In many
> case some Boolean is computed and the assertion tests that Boolean.
With the above example, you could show _how_ the boolean is computed.
That assert would print stuff like
"Assertion failed at foobar.java:123: ((5 + 6 + 8) == 18)"
or
"Assertion failed at foobar.java:666: (verifyBlackMagic(1, 2, 3, 4))"
Yes, but I think what's needed is more like:
if (p.host != NIL) {
if (p.host instanceof SimpleString) {
host = new SimpleString(((SimpleString)p.host).getStringValue());
} else if (p.host instanceof Symbol) {
host = p.host;
} else if (p.host instanceof Cons) {
host = new Cons((Cons)p.host);
} else {
Debug.assertTrue(false);
==>
Debug.fail("Expected pathname host of '"+ p + "' to be a string, symbol, or cons");
-Alan
}