<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:large">Hi Levente,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 9, 2020 at 4:04 PM Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu">leves@caesar.elte.hu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi Eliot,<br>
<br>
On Fri, 9 Oct 2020, Eliot Miranda wrote:<br>
<br>
> Hi All,<br>
> <br>
>     moving code from a test into a workspace and back is painful because Object does not implement assert:equals: or assert:equals:description: even though it implements assert:description:.  So one has to edit out the<br>
> equals: moving to the workspace and edit it back in again on the way back.  I'd like to suggest implementing Object>>assert:equals: and Object>>assert:equals:description: but I won't, because someone is bound to criticise it<br>
> as being too green or ill considered or some other depressing BS.<br>
<br>
In my opinion, it would be better to get rid of #assert:equals: and <br>
#assert:equals:description:. Many find the order of its arguments <br>
confusing, and they are only good to help tracking down what failed.<br>
If #assert: could give information about it's argument: the source code<br>
and probably the values of the variables in it, then #assert:equals: would <br>
simply become unnecessary.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:large">I couldn't agree more.  I *hate* assert:equals: being, for me, the wrong way round.  We would need to provide an abstraction around extracting the parse tree for an argument, which shouldn't be too hard.  Let me take a look at this and see if I can provide something simple and robust.</div><div class="gmail_default" style="font-size:large"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
For example<br>
<br>
| x y |<br>
x := 'foo'.<br>
y := 1.<br>
self assert: x = y.<br>
<br>
would signal an exception with the message 'Assertion failed: x = y (x = <br>
''foo'', y = 1)' instead of just 'Assertion failed'.<br>
<br>
<br>
Levente<br></blockquote></div><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>