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